Skip to content

Commit

Permalink
Node: Increase subscription buffer size from 32 to 1024 (wormhole-fou…
Browse files Browse the repository at this point in the history
  • Loading branch information
barnjamin authored Jul 11, 2023
1 parent 83c5893 commit 2d9af4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/pkg/p2p/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ func Run(
return fmt.Errorf("failed to join topic: %w", err)
}

sub, err := th.Subscribe()
// Increase the buffer size to prevent failed delivery
// to slower subscribers
sub, err := th.Subscribe(pubsub.WithBufferSize(1024))
if err != nil {
return fmt.Errorf("failed to subscribe topic: %w", err)
}
Expand Down

0 comments on commit 2d9af4d

Please sign in to comment.