Skip to content

Commit

Permalink
fix: nil msg
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Dec 21, 2022
1 parent 627fbba commit e69d6e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions waku/v2/node/wakunode2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ func Test5000(t *testing.T) {
case <-ticker.C:
require.Fail(t, "Timeout Sub1")
case msg := <-sub1.C:
if msg == nil {
return
}
if bytes.Equal(msg.Message().Payload, maxMsgBytes) {
return
}
Expand All @@ -135,6 +138,9 @@ func Test5000(t *testing.T) {
case <-ticker.C:
require.Fail(t, "Timeout Sub2")
case msg := <-sub2.C:
if msg == nil {
return
}
if bytes.Equal(msg.Message().Payload, maxMsgBytes) {
return
}
Expand Down

0 comments on commit e69d6e6

Please sign in to comment.