summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-03-20 16:41:50 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-25 09:43:37 +0200
commitfb294acb887e6715d92507ddb18b49e30df2f3c2 (patch)
treed567d5cfc5ce3559a8775403e1633e3fa7aa5108
parent078e6b2e1c9a95c0a38e315c994bfcabed0c1784 (diff)
Client: Check if the base time is zero when getting expiry times
-rw-r--r--client/client.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/client.go b/client/client.go
index 31110bd..3d059df 100644
--- a/client/client.go
+++ b/client/client.go
@@ -296,6 +296,10 @@ func (c *Client) ExpiryTimes() (*srvtypes.Expiry, error) {
return nil, err
}
+ if b.StartTime.IsZero() {
+ return nil, errors.New("start time is zero, did you get a configuration?")
+ }
+
bT := b.RenewButtonTime()
cT := b.CountdownTime()
nT := b.NotificationTimes()