소스 검색

actually wait for done

v2ray 9 년 전
부모
커밋
ea6ccb88af
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      common/protocol/user_validator.go

+ 1 - 1
common/protocol/user_validator.go

@@ -56,7 +56,7 @@ func NewTimedUserValidator(hasher IDHash) UserValidator {
 
 func (this *TimedUserValidator) Release() {
 	this.cancel.Cancel()
-	this.cancel.WaitForDone()
+	<-this.cancel.WaitForDone()
 
 	this.validUsers = nil
 	this.userHash = nil