File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -502,7 +502,11 @@ async fn do_dial(
502
502
// .await
503
503
// .map_err(|e| Error::WebRTC(e.into()))?;
504
504
505
- Ok ( ( peer_id, Connection :: new ( peer_connection) . await ) )
505
+ let mut c = Connection :: new ( peer_connection) . await ;
506
+ // XXX: default buffer size is too small to fit some messages. Possibly remove once
507
+ // https://github.com/webrtc-rs/sctp/issues/28 is fixed.
508
+ c. set_data_channels_read_buf_capacity ( 8192 * 10 ) ;
509
+ Ok ( ( peer_id, c) )
506
510
}
507
511
508
512
/// Creates a [`Multiaddr`] from the given IP address and port number.
Original file line number Diff line number Diff line change @@ -160,5 +160,9 @@ pub async fn webrtc(
160
160
// .await
161
161
// .map_err(|e| Error::WebRTC(e.into()))?;
162
162
163
- Ok ( ( peer_id, Connection :: new ( peer_connection) . await ) )
163
+ let mut c = Connection :: new ( peer_connection) . await ;
164
+ // XXX: default buffer size is too small to fit some messages. Possibly remove once
165
+ // https://github.com/webrtc-rs/sctp/issues/28 is fixed.
166
+ c. set_data_channels_read_buf_capacity ( 8192 * 10 ) ;
167
+ Ok ( ( peer_id, c) )
164
168
}
You can’t perform that action at this time.
0 commit comments