small fix
This commit is contained in:
@ -236,11 +236,11 @@ func (cc *ClientConn) WaitForStateChange(timeout time.Duration, sourceState Conn
|
|||||||
if sourceState != cc.state {
|
if sourceState != cc.state {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
done := make(chan struct{})
|
|
||||||
expired := timeout <= time.Since(start)
|
expired := timeout <= time.Since(start)
|
||||||
if expired {
|
if expired {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
done := make(chan struct{})
|
||||||
go func() {
|
go func() {
|
||||||
select {
|
select {
|
||||||
case <-time.After(timeout-time.Since(start)):
|
case <-time.After(timeout-time.Since(start)):
|
||||||
|
Reference in New Issue
Block a user