Skip to content

Commit 3e3e4cd

Browse files
authored
Merge pull request #490 from blinklabs-io/test/handshake-server-panic-fix
test: fix random panic in handshake server tests
2 parents c5a0f54 + 20c4e34 commit 3e3e4cd

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

protocol/handshake/server_test.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,8 @@ func TestServerHandshakeRefuseVersionMismatch(t *testing.T) {
122122
if err.Error() != expectedErr.Error() {
123123
t.Fatalf("unexpected error when creating Ouroboros object: %s", err)
124124
}
125+
} else {
126+
oConn.Close()
127+
t.Fatalf("did not receive expected error")
125128
}
126-
// Async error handler
127-
go func() {
128-
err, ok := <-oConn.ErrorChan()
129-
if !ok {
130-
return
131-
}
132-
panic(fmt.Sprintf("unexpected Ouroboros error: %s", err))
133-
}()
134129
}

0 commit comments

Comments
 (0)