re-init maps when they are empty

This commit is contained in:
Darien Raymond committed 2018-04-07 23:07:30 +02:00
1 parent deb7dab8f3
commit 83625618ee
3 files changed
+12

No files matched your search

+4
View File
@@ -78,6 +78,10 @@ func (h *SessionHistory) removeExpiredEntries() {
delete(h.cache, session)
}
}
if len(h.cache) == 0 {
h.cache = make(map[sessionId]time.Time, 128)
}
}
type ServerSession struct {