Skip to content

Commit

Permalink
all: don't call t.Fatal from a goroutine
Browse files Browse the repository at this point in the history
Fixes golang#17900.

Change-Id: I42cda6ac9cf48ed739d3a015a90b3cb15edf8ddf
Reviewed-on: https://go-review.googlesource.com/33243
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
ianlancetaylor committed Nov 15, 2016
1 parent b872555 commit 5869536
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion handshake_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ func TestRenegotiationExtension(t *testing.T) {
buf = make([]byte, 1024)
n, err := c.Read(buf)
if err != nil {
t.Fatalf("Server read returned error: %s", err)
t.Errorf("Server read returned error: %s", err)
return
}
buf = buf[:n]
c.Close()
Expand Down
6 changes: 4 additions & 2 deletions tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,14 @@ func TestTLSUniqueMatches(t *testing.T) {
for i := 0; i < 2; i++ {
sconn, err := ln.Accept()
if err != nil {
t.Fatal(err)
t.Error(err)
return
}
serverConfig := testConfig.Clone()
srv := Server(sconn, serverConfig)
if err := srv.Handshake(); err != nil {
t.Fatal(err)
t.Error(err)
return
}
serverTLSUniques <- srv.ConnectionState().TLSUnique
}
Expand Down

0 comments on commit 5869536

Please sign in to comment.