From 20c272ff3dabbbcb6a92de49dda7bd0c322a3b57 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sun, 20 Jun 2021 20:16:27 -0700 Subject: [PATCH] Guard against invalid last disconnect time --- core/stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/stats.go b/core/stats.go index 0f2bd643c..33e04951c 100644 --- a/core/stats.go +++ b/core/stats.go @@ -148,7 +148,7 @@ func getSavedStats() models.Stats { savedLastDisconnectTime, savedLastDisconnectTimeErr := data.GetLastDisconnectTime() var lastDisconnectTime utils.NullTime - if savedLastDisconnectTimeErr == nil { + if savedLastDisconnectTimeErr == nil && savedLastDisconnectTime.Valid { lastDisconnectTime = savedLastDisconnectTime }