Skip to content

Commit d6ab814

Browse files
committed
increase buffer size in common
1 parent 18e48bf commit d6ab814

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

common/src/typed_socket/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ async fn new_client<T: ChannelMessage>(
125125
mut socket: Socket,
126126
remote_handshake: Handshake,
127127
) -> Result<TypedSocket<T>, PlaneClientError> {
128-
let (send_to_client, recv_to_client) = tokio::sync::mpsc::channel::<T::Reply>(100);
128+
let (send_to_client, recv_to_client) = tokio::sync::mpsc::channel::<T::Reply>(1024);
129129
let (send_from_client, mut recv_from_client) =
130-
tokio::sync::mpsc::channel::<SocketAction<T>>(100);
130+
tokio::sync::mpsc::channel::<SocketAction<T>>(1024);
131131

132132
tokio::spawn(async move {
133133
loop {

common/src/typed_socket/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ pub async fn new_server<T: ChannelMessage>(
109109

110110
local_handshake.check_compat(&remote_handshake);
111111

112-
let (outgoing_message_sender, outgoing_message_receiver) = tokio::sync::mpsc::channel(100);
113-
let (incoming_message_sender, incoming_message_receiver) = tokio::sync::mpsc::channel(100);
112+
let (outgoing_message_sender, outgoing_message_receiver) = tokio::sync::mpsc::channel(1024);
113+
let (incoming_message_sender, incoming_message_receiver) = tokio::sync::mpsc::channel(1024);
114114
tokio::spawn(async move {
115115
handle_messages(outgoing_message_receiver, incoming_message_sender, ws).await;
116116
});

0 commit comments

Comments
 (0)