mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 22:31:09 +03:00
Guard against invalid last disconnect time
This commit is contained in:
parent
e61b83c5ed
commit
20c272ff3d
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ func getSavedStats() models.Stats {
|
||||||
savedLastDisconnectTime, savedLastDisconnectTimeErr := data.GetLastDisconnectTime()
|
savedLastDisconnectTime, savedLastDisconnectTimeErr := data.GetLastDisconnectTime()
|
||||||
|
|
||||||
var lastDisconnectTime utils.NullTime
|
var lastDisconnectTime utils.NullTime
|
||||||
if savedLastDisconnectTimeErr == nil {
|
if savedLastDisconnectTimeErr == nil && savedLastDisconnectTime.Valid {
|
||||||
lastDisconnectTime = savedLastDisconnectTime
|
lastDisconnectTime = savedLastDisconnectTime
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue