1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-26 17:35:23 +00:00
This commit is contained in:
Darien Raymond 2017-04-25 23:51:04 +02:00
parent 2ad0e359ef
commit 4668f9d3de
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -45,14 +45,13 @@ func NewSessionHistory(ctx context.Context) *SessionHistory {
func (h *SessionHistory) add(session sessionId) {
h.Lock()
h.cache[session] = time.Now().Add(time.Minute * 3)
h.Unlock()
select {
case <-h.token.Wait():
go h.run()
default:
}
h.Unlock()
}
func (h *SessionHistory) has(session sessionId) bool {