main: fix socket handling
This commit is contained in:
parent
7fe1d2f761
commit
15f64358a2
@ -161,7 +161,7 @@ fn main() -> ! {
|
|||||||
|
|
||||||
// TCP protocol handling
|
// TCP protocol handling
|
||||||
server.for_each(|mut socket, session| {
|
server.for_each(|mut socket, session| {
|
||||||
if ! socket.is_open() {
|
if ! socket.is_active() {
|
||||||
let _ = socket.listen(TCP_PORT);
|
let _ = socket.listen(TCP_PORT);
|
||||||
session.reset();
|
session.reset();
|
||||||
} else if socket.can_send() && socket.can_recv() && socket.send_capacity() - socket.send_queue() > 1024 {
|
} else if socket.can_send() && socket.can_recv() && socket.send_capacity() - socket.send_queue() > 1024 {
|
||||||
|
Loading…
Reference in New Issue
Block a user