2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 05:03:34 +08:00

runtime/net_server: restore connection close behavior when len<0

This commit is contained in:
Sebastien Bourdeauducq 2016-03-19 22:46:42 +08:00
parent fc558bcd27
commit ffe4d81f3e

View File

@ -168,10 +168,10 @@ static void tcp_pcb_service(void *arg, struct tcp_pcb *pcb)
tcp_write(pcb, data, len, 0);
instance->ack_consumed(len);
}
if(close_flag) {
if(close_flag)
tcp_output(pcb);
if((len < 0) || close_flag)
net_server_close(cs, pcb);
}
}
}