Bump tokio-tungstenite from 0.24.0 to 0.26.2 (#7329)
This commit is contained in:
@ -206,7 +206,7 @@ impl EngineConnection {
|
||||
async fn inner_send_to_engine(request: WebSocketRequest, tcp_write: &mut WebSocketTcpWrite) -> Result<()> {
|
||||
let msg = serde_json::to_string(&request).map_err(|e| anyhow!("could not serialize json: {e}"))?;
|
||||
tcp_write
|
||||
.send(WsMsg::Text(msg))
|
||||
.send(WsMsg::Text(msg.into()))
|
||||
.await
|
||||
.map_err(|e| anyhow!("could not send json over websocket: {e}"))?;
|
||||
Ok(())
|
||||
@ -216,19 +216,17 @@ impl EngineConnection {
|
||||
async fn inner_send_to_engine_binary(request: WebSocketRequest, tcp_write: &mut WebSocketTcpWrite) -> Result<()> {
|
||||
let msg = bson::to_vec(&request).map_err(|e| anyhow!("could not serialize bson: {e}"))?;
|
||||
tcp_write
|
||||
.send(WsMsg::Binary(msg))
|
||||
.send(WsMsg::Binary(msg.into()))
|
||||
.await
|
||||
.map_err(|e| anyhow!("could not send json over websocket: {e}"))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn new(ws: reqwest::Upgraded) -> Result<EngineConnection> {
|
||||
let wsconfig = tokio_tungstenite::tungstenite::protocol::WebSocketConfig {
|
||||
let wsconfig = tokio_tungstenite::tungstenite::protocol::WebSocketConfig::default()
|
||||
// 4294967296 bytes, which is around 4.2 GB.
|
||||
max_message_size: Some(usize::MAX),
|
||||
max_frame_size: Some(usize::MAX),
|
||||
..Default::default()
|
||||
};
|
||||
.max_message_size(Some(usize::MAX))
|
||||
.max_frame_size(Some(usize::MAX));
|
||||
|
||||
let ws_stream = tokio_tungstenite::WebSocketStream::from_raw_socket(
|
||||
ws,
|
||||
|
Reference in New Issue
Block a user