Skip to content

Commit

Permalink
holepunch: fix assertion in test
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Sep 3, 2023
1 parent 9336fe9 commit dd49d19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions p2p/protocol/holepunch/holepunch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,10 @@ func TestFailuresOnResponder(t *testing.T) {
defer relay.Close()

s, err := h2.NewStream(network.WithUseTransient(context.Background(), "holepunch"), h1.ID(), holepunch.Protocol)
require.NoError(t, err)

go tc.initiator(s)
// h1 will reset the stream. This might or might not happen before multistream has finished.
if err == nil {
go tc.initiator(s)
}

getTracerError := func(tr *mockEventTracer) []string {
var errs []string
Expand Down

0 comments on commit dd49d19

Please sign in to comment.