Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshowers committed Nov 20, 2023
1 parent fad92cc commit 555aa2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions gateway/src/serial_console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ pub(crate) async fn run(
log: Logger,
) -> WebsocketChannelResult {
let upgraded = conn.into_inner();
let config =
WebSocketConfig { max_send_queue: Some(4096), ..Default::default() };
let config = WebSocketConfig {
// Maintain a max write buffer size of 2 MB (this is only relevant if
// writes are failing).
max_write_buffer_size: 1 << 21,
..Default::default()
};
let ws_stream =
WebSocketStream::from_raw_socket(upgraded, Role::Server, Some(config))
.await;
Expand Down
3 changes: 2 additions & 1 deletion gateway/tests/integration_tests/serial_console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ async fn serial_console_detach() {
}
tungstenite::Error::ConnectionClosed
| tungstenite::Error::AlreadyClosed
| tungstenite::Error::AttackAttempt
| tungstenite::Error::Io(_)
| tungstenite::Error::Tls(_)
| tungstenite::Error::Capacity(_)
| tungstenite::Error::Protocol(_)
| tungstenite::Error::SendQueueFull(_)
| tungstenite::Error::WriteBufferFull(_)
| tungstenite::Error::Utf8
| tungstenite::Error::Url(_)
| tungstenite::Error::HttpFormat(_) => panic!("unexpected error"),
Expand Down

0 comments on commit 555aa2d

Please sign in to comment.