Explorar el Código

net/acceptor: Gracefully handle ETIMEDOUT

parazyd hace 2 años
padre
commit
29eee31e20
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      src/net/acceptor.rs

+ 7 - 0
src/net/acceptor.rs

@@ -157,6 +157,13 @@ impl Acceptor {
                         );
                         continue
                     }
+                    libc::ETIMEDOUT => {
+                        warn!(
+                            target: "net::acceptor::run_accept_loop()",
+                            "[P2P] Connection timed out in accept_loop"
+                        );
+                        continue
+                    }
                     x => {
                         error!(
                             target: "net::acceptor::run_accept_loop()",