Explorar o código

actually wait for done

v2ray %!s(int64=9) %!d(string=hai) anos
pai
achega
ea6ccb88af
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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