0

Do not save invalid disconnect time

This commit is contained in:
Gabe Kangas 2021-06-29 11:38:13 -07:00
parent 12104978e8
commit 0802a20f4f

View File

@ -136,9 +136,11 @@ func saveStats() error {
if err := data.SetPeakSessionViewerCount(_stats.SessionMaxViewerCount); err != nil { if err := data.SetPeakSessionViewerCount(_stats.SessionMaxViewerCount); err != nil {
log.Errorln("error saving viewer count", err) log.Errorln("error saving viewer count", err)
} }
if _stats.LastDisconnectTime.Valid {
if err := data.SetLastDisconnectTime(_stats.LastConnectTime.Time); err != nil { if err := data.SetLastDisconnectTime(_stats.LastConnectTime.Time); err != nil {
log.Errorln("error saving disconnect time", err) log.Errorln("error saving disconnect time", err)
} }
}
return nil return nil
} }