Do not save invalid disconnect time
This commit is contained in:
parent
12104978e8
commit
0802a20f4f
@ -136,8 +136,10 @@ 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 err := data.SetLastDisconnectTime(_stats.LastConnectTime.Time); err != nil {
|
if _stats.LastDisconnectTime.Valid {
|
||||||
log.Errorln("error saving disconnect time", err)
|
if err := data.SetLastDisconnectTime(_stats.LastConnectTime.Time); err != nil {
|
||||||
|
log.Errorln("error saving disconnect time", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user