Sfoglia il codice sorgente

net/acceptor: Print debug message when incoming connection limit is reached

parazyd 2 anni fa
parent
commit
8b08ce87f8
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/net/acceptor.rs

+ 2 - 1
src/net/acceptor.rs

@@ -24,7 +24,7 @@ use std::{
     },
 };
 
-use log::error;
+use log::{debug, error};
 use smol::Executor;
 use url::Url;
 
@@ -107,6 +107,7 @@ impl Acceptor {
                 // These channels are the channels spawned below on listener.next().is_ok().
                 // After the notification, we reset the condvar and retry this loop to see
                 // if we can accept more connections, and if not - we'll be back here.
+                debug!(target: "net::acceptor::run_accept_loop()", "Reached incoming conn limit, waiting...");
                 cv.wait().await;
                 cv.reset();
                 continue