disallow negative values in ExtendExpiry, fix nil map err

This commit is contained in:
Harvey Tindall
2021-04-06 14:00:32 +01:00
parent afedc78113
commit 8a6cfe0b4d
2 changed files with 8 additions and 3 deletions
+3
View File
@@ -480,6 +480,9 @@ func (st *Storage) storeInvites() error {
}
func (st *Storage) loadUsers() error {
if st.users == nil {
st.users = map[string]time.Time{}
}
st.usersLock.Lock()
defer st.usersLock.Unlock()
temp := map[string]time.Time{}