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
1 changed files with 2 additions and 2 deletions

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);
}
}
}