Skip to content

Commit 4a994c5

Browse files
authored
fix: decrease max buffered amount for WebRTC datachannels (#2628)
From experimental testing, 16MB is too big for Chrome to handle, when sending large amounts of data - the `bufferedamountlow` never fires. Lower it to 2MB which seems to work better when running the Helia transport benchmarks.
1 parent c164e2e commit 4a994c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/transport-webrtc/src/stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface WebRTCStreamInit extends AbstractStreamInit, DataChannelOptions
2727
/**
2828
* How much can be buffered to the DataChannel at once
2929
*/
30-
export const MAX_BUFFERED_AMOUNT = 16 * 1024 * 1024
30+
export const MAX_BUFFERED_AMOUNT = 2 * 1024 * 1024
3131

3232
/**
3333
* How long time we wait for the 'bufferedamountlow' event to be emitted

0 commit comments

Comments
 (0)