mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-19 14:41:42 +03:00
net: timeout on accept_async socket too
This commit is contained in:
parent
11b1805d26
commit
72bb9a872f
@ -384,7 +384,7 @@ async fn direct_networking(
|
||||
// to prevent some amount of potential DDoS attacks.
|
||||
// can also block based on socket_addr
|
||||
// ignore connections we failed to accept...?
|
||||
if let Ok(websocket) = accept_async(MaybeTlsStream::Plain(stream)).await {
|
||||
if let Ok(Ok(websocket)) = time::timeout(TIMEOUT, accept_async(MaybeTlsStream::Plain(stream))).await {
|
||||
print_debug(&print_tx, "net: received new websocket connection").await;
|
||||
let (peer_id, routing_for, conn) =
|
||||
match time::timeout(TIMEOUT, recv_connection(
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 99759929dd38e515ad4f93ac98459af0e6180385
|
||||
Subproject commit 7120168626f4e9b09008844174c63fc30af8711f
|
Loading…
Reference in New Issue
Block a user