mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-11-27 08:14:10 +00:00
Bound WebSocket upgrade handshake duration (#722)
* Bound WebSocket upgrade handshake duration * Document changed function contracts
This commit is contained in:
1 parent
134008e0e9
commit
474fbc7de4
2 files changed
+4
-2
No files matched your search
@@ -1216,6 +1216,7 @@ impl RendezvousServer {
|
||||
});
|
||||
}
|
||||
|
||||
/// Processes rendezvous messages on an accepted TCP or WebSocket connection.
|
||||
#[inline]
|
||||
async fn handle_listener_inner(
|
||||
&mut self,
|
||||
@@ -1251,7 +1252,7 @@ impl RendezvousServer {
|
||||
}
|
||||
Ok(response)
|
||||
};
|
||||
let ws_stream = tokio_tungstenite::accept_hdr_async(stream, callback).await?;
|
||||
let ws_stream = timeout(30_000, tokio_tungstenite::accept_hdr_async(stream, callback)).await??;
|
||||
let (a, mut b) = ws_stream.split();
|
||||
sink = Some(Sink::Ws(a));
|
||||
while let Ok(Some(Ok(msg))) = timeout(30_000, b.next()).await {
|
||||
|
||||
Reference in new issue
Block a user