Commit 0b588ed7 authored by Eyal Posener's avatar Eyal Posener Committed by Brad Fitzpatrick

nettest: break on unexpected error

in the resyncConn, break the read loop on read error.
if error is returned, constantly, and the loop is not breaking,
the test will never finish.
continue to fail the test on this unexpected error is also pointless.

Change-Id: I8f2f5e7b3d37c2a194cbdcde51734580f5b2436d
Reviewed-on: https://go-review.googlesource.com/41332Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent c8c74377
...@@ -433,6 +433,7 @@ func resyncConn(t *testing.T, c net.Conn) { ...@@ -433,6 +433,7 @@ func resyncConn(t *testing.T, c net.Conn) {
} }
if err != nil { if err != nil {
t.Errorf("unexpected Read error: %v", err) t.Errorf("unexpected Read error: %v", err)
break
} }
} }
if err := <-errCh; err != nil { if err := <-errCh; err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment