From 89b7a0acfafc87fd4fa0f442f1ca24e6ece5dfe5 Mon Sep 17 00:00:00 2001 From: saxon Date: Wed, 28 Nov 2018 15:33:56 +1030 Subject: [PATCH] revid: reverted section of code which deals with failed restart of connection --- revid/revid.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/revid/revid.go b/revid/revid.go index df534f15..c3af4cd9 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -386,9 +386,10 @@ loop: if rs, ok := dest.(restarter); ok { r.config.Logger.Log(smartlogger.Debug, pkg+"restarting session", "session", rs) err = rs.restart() - for err != nil { - r.config.Logger.Log(smartlogger.Error, pkg+"failed to restart rtmp session, trying again", "error", err.Error()) - err = rs.restart() + if err != nil { + r.config.Logger.Log(smartlogger.Error, pkg+"failed to restart rtmp session", "error", err.Error()) + r.isRunning = false + return } r.config.Logger.Log(smartlogger.Info, pkg+"restarted rtmp session")