mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-11-13 20:23:00 -08:00
re-init maps when they are empty
This commit is contained in:
3 files changed
+12
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user