Просмотр исходного кода

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

parazyd 2 лет назад
Родитель
Сommit
8b08ce87f8
1 измененных файлов с 2 добавлено и 1 удалено
  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