udp: replace concurrently reset timer with ticker

Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
This commit is contained in:
mpl 2020-03-18 14:50:06 +01:00 committed by GitHub
parent 9012f2d6b1
commit 63d7ed74f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 23 deletions

View file

@ -92,7 +92,7 @@ func TestShutdownUDPConn(t *testing.T) {
select {
case <-doneChan:
case <-time.Tick(time.Second * 5):
case <-time.Tick(10 * time.Second):
// In case we introduce a regression that would make the test wait forever.
t.Fatal("Timeout during shutdown")
}