mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-10-05 15:47:00 +08:00
防止json循环引用
This commit is contained in:
@@ -268,7 +268,6 @@ func (client *RTSP) startStream() {
|
|||||||
//loggerTime := time.Now().Add(-10 * time.Second)
|
//loggerTime := time.Now().Add(-10 * time.Second)
|
||||||
defer func() {
|
defer func() {
|
||||||
if client.Err() == nil && config.Reconnect {
|
if client.Err() == nil && config.Reconnect {
|
||||||
Printf("reconnecting:%s", client.URL)
|
|
||||||
client.RTSPClientInfo = RTSPClientInfo{}
|
client.RTSPClientInfo = RTSPClientInfo{}
|
||||||
Printf("reconnecting:%s in 5 seconds", client.URL)
|
Printf("reconnecting:%s in 5 seconds", client.URL)
|
||||||
time.AfterFunc(time.Second*5, client.startStream)
|
time.AfterFunc(time.Second*5, client.startStream)
|
||||||
@@ -277,6 +276,7 @@ func (client *RTSP) startStream() {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
if err := client.requestStream(); err != nil {
|
if err := client.requestStream(); err != nil {
|
||||||
|
Printf("rtsp requestStream err:%v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for client.Err() == nil {
|
for client.Err() == nil {
|
||||||
|
Reference in New Issue
Block a user