mirror of https://github.com/v2ray/v2ray-core
				
				
				
			refactor
							parent
							
								
									2ad0e359ef
								
							
						
					
					
						commit
						4668f9d3de
					
				|  | @ -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 { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Darien Raymond
						Darien Raymond