From 15f64358a20a71782bdbc2c45dd7d928287a5a2f Mon Sep 17 00:00:00 2001 From: Astro Date: Sat, 21 Mar 2020 00:37:24 +0100 Subject: [PATCH] main: fix socket handling --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1d14e00..e38006f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -161,7 +161,7 @@ fn main() -> ! { // TCP protocol handling server.for_each(|mut socket, session| { - if ! socket.is_open() { + if ! socket.is_active() { let _ = socket.listen(TCP_PORT); session.reset(); } else if socket.can_send() && socket.can_recv() && socket.send_capacity() - socket.send_queue() > 1024 {