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 {
|
||||
log.Errorln("error saving viewer count", err)
|
||||
}
|
||||
if err := data.SetLastDisconnectTime(_stats.LastConnectTime.Time); err != nil {
|
||||
log.Errorln("error saving disconnect time", err)
|
||||
if _stats.LastDisconnectTime.Valid {
|
||||
if err := data.SetLastDisconnectTime(_stats.LastConnectTime.Time); err != nil {
|
||||
log.Errorln("error saving disconnect time", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user