Fix WaitReady() for nonlinux platform

This commit is contained in:
Tevin Zhang 2019-02-12 15:13:30 +08:00
parent a72775abcb
commit 2ef7e36ff8
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ func NewChecker() *Checker {
// NewCheckerZeroLinger creates a Checker with zeroLinger set to given value. // NewCheckerZeroLinger creates a Checker with zeroLinger set to given value.
func NewCheckerZeroLinger(zeroLinger bool) *Checker { func NewCheckerZeroLinger(zeroLinger bool) *Checker {
return &Checker{zeroLinger: zeroLinger, isReady: make(chan struct{})} isReady := make(chan struct{})
close(isReady)
return &Checker{zeroLinger: zeroLinger, isReady: isReady}
} }
// CheckingLoop is unnecessary on this platform. // CheckingLoop is unnecessary on this platform.