Update itests/kit/rpc.go

Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
This commit is contained in:
dirkmc 2022-04-07 13:32:00 +02:00 committed by GitHub
parent 5f0489ace0
commit c34ade9ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,11 +44,9 @@ func waitUpTo(fn func(), waitTime time.Duration, errMsg string) {
close(ch)
}()
timer := time.NewTimer(waitTime)
defer timer.Stop()
select {
case <-ch:
case <-timer.C:
case <-time.After(waitTime):
fmt.Println(errMsg)
return
}