forked from M-Labs/thermostat
main: fix socket handling
This commit is contained in:
parent
7fe1d2f761
commit
15f64358a2
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user