From 03a919dd0c7c3bf155a9a2192436ce399734cc53 Mon Sep 17 00:00:00 2001 From: Saxon1 Date: Thu, 3 May 2018 14:28:14 +0930 Subject: [PATCH] trying to fix mem problem --- revid/Revid.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/revid/Revid.go b/revid/Revid.go index 6313ba76..16330691 100644 --- a/revid/Revid.go +++ b/revid/Revid.go @@ -382,6 +382,7 @@ func (r *revid) outputClips() { r.Log(Debug,"About to send!") err2 := r.sendClip(clip) r.Log(Debug,"Finished send!") + for ; err2 != nil; errorCount++ { r.Log(Warning, "Send failed trying again!") // If the clip size is not bigger than the threshold then we classify @@ -402,6 +403,7 @@ func (r *revid) outputClips() { r.Log(Error, err2.Error()) if r.config.Output == NativeRtmp && errorCount > 10 { r.rtmpInst.EndSession() + r.rtmpInst = rtmp.NewRTMPSession(r.config.RtmpUrl, rtmpConnectionTimout) err = r.rtmpInst.StartSession() } }