revid: added send retry flag

This commit is contained in:
saxon 2018-12-14 20:50:26 +10:30
parent ab643f2b97
commit 1095f32ae4
2 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,7 @@ type Config struct {
IntraRefreshPeriod string
RtpAddress string
Logger Logger
SendRetry bool
}
// Enums for config struct

View File

@ -379,6 +379,8 @@ loop:
err = dest.send()
if err == nil {
r.config.Logger.Log(smartlogger.Debug, pkg+"sent clip to output "+strconv.Itoa(i))
} else if r.config.SendRetry == false {
r.config.Logger.Log(smartlogger.Warning, pkg+"send to output "+strconv.Itoa(i)+"failed", "error", err.Error())
} else {
r.config.Logger.Log(smartlogger.Error, pkg+"send to output "+strconv.Itoa(i)+
"failed, trying again", "error", err.Error())