--- The client throttles connection by decreasing its window: --- [13:25:18.078] lwip: ip_input: iphdr->dest 0x42d363a7 netif->ip_addr 0x200c80a (0xd063a7, 0xc80a, 0x42030000) (from client) [ACK] Seq=117 Ack=338819 Win=270 Len=0 --- lwip sends the last chunk of data that fits the window: --- [13:25:18.609] lwip: tcp_output_segment: 345329:345599 (from lwip) [TCP Window Full] [TCP segment of a reassembled PDU] --- The client informs that the window is zero: --- [13:25:18.734] lwip: ip_input: iphdr->dest 0x42d363a7 netif->ip_addr 0x200c80a (0xd063a7, 0xc80a, 0x42030000) (from client) [TCP ZeroWindow] [ACK] Seq=117 Ack=339089 Win=0 Len=0 --- Apparently lwip wonders if the window is still zero: --- [13:25:19.218] lwip: tcp_zero_window_probe: tcp_ticks 8 pcb->tmr 5 pcb->keep_cnt_sent 0 (from lwip) [TCP ZeroWindowProbe] [TCP segment of a reassembled PDU] --- Client says it's still zero: --- [13:25:19.218] lwip: ip_input: iphdr->dest 0x42d363a7 netif->ip_addr 0x200c80a (0xd063a7, 0xc80a, 0x42030000) (from client) [TCP ZeroWindowProbeAck] [TCP ZeroWindow] [ACK] Seq=117 Ack=339089 Win=0 Len=0 --- The client decides to resume the transfer and sends a window update: --- [13:25:19.250] lwip: ip_input: iphdr->dest 0x42d363a7 netif->ip_addr 0x200c80a (0xd063a7, 0xc80a, 0x42030000) [TCP Window Update] [ACK] Seq=117 Ack=339089 Win=65535 Len=0 --- lwip sends 21 data packets to the client: --- [13:25:19.250] lwip: tcp_output_segment: 345599:346761 [13:25:19.250] lwip: tcp_output_segment: 346761:348193 // Sequence number: 340251 (as per Wireshark) [13:25:19.250] lwip: tcp_output_segment: 348193:349625 [13:25:19.250] lwip: tcp_output_segment: 349625:351057 [13:25:19.250] lwip: tcp_output_segment: 351057:352489 [13:25:19.250] lwip: tcp_output_segment: 352489:353921 [13:25:19.250] lwip: tcp_output_segment: 353921:355353 [13:25:19.250] lwip: tcp_output_segment: 355353:356785 [13:25:19.250] lwip: tcp_output_segment: 356785:358217 [13:25:19.250] lwip: tcp_output_segment: 358217:359649 [13:25:19.250] lwip: tcp_output_segment: 359649:361081 [13:25:19.250] lwip: tcp_output_segment: 361081:362513 [13:25:19.250] lwip: tcp_output_segment: 362513:363945 [13:25:19.250] lwip: tcp_output_segment: 363945:365377 [13:25:19.250] lwip: tcp_output_segment: 365377:366809 [13:25:19.250] lwip: tcp_output_segment: 366809:368241 [13:25:19.250] lwip: tcp_output_segment: 368241:369673 [13:25:19.250] lwip: tcp_output_segment: 369673:371105 [13:25:19.250] lwip: tcp_output_segment: 371105:372537 [13:25:19.250] lwip: tcp_output_segment: 372537:373969 [13:25:19.250] lwip: tcp_output_segment: 373969:374799 --- This ACK (340251) will be sent twice by the client: --- [13:25:19.437] lwip: ip_input: iphdr->dest 0x42d363a7 netif->ip_addr 0x200c80a (0xd063a7, 0xc80a, 0x42030000) (from client) [ACK] Seq=117 Ack=340251 Win=64373 Len=0 --- Some more data from lwip flying in: --- [13:25:19.437] lwip: tcp_output_segment: 374799:375961 (from lwip) [TCP segment of a reassembled PDU] --- The last packet that client sends to lwip is repeating the ACK 340251 again: --- [13:25:19.437] lwip: ip_input: iphdr->dest 0x42d363a7 netif->ip_addr 0x200c80a (0xd063a7, 0xc80a, 0x42030000) (from client) [TCP Dup ACK 479#1] [ACK] Seq=117 Ack=340251 Win=64373 Len=0 --- Here LwIP tries to talk to the client, the client ignores all keepalives and retransmissions: --- [13:25:20.218] lwip: tcp_output_segment: 346761:348193 (from lwip) [TCP Retransmission] [TCP segment of a reassembled PDU] [13:25:21.828] lwip: tcp_output_segment: 346761:348193 (from lwip) [TCP Retransmission] [TCP segment of a reassembled PDU] [13:25:24.640] lwip: tcp_keepalive: sending KEEPALIVE probe to 10.200.0.1 (from lwip) [TCP Keep-Alive] [ACK] Seq=369450 Ack=117 Win=11564 Len=0 [13:25:25.046] lwip: tcp_output_segment: 346761:348193 (from lwip) [TCP Retransmission] [TCP segment of a reassembled PDU] [13:25:29.671] lwip: tcp_keepalive: sending KEEPALIVE probe to 10.200.0.1 (from lwip) [TCP Keep-Alive] [ACK] Seq=369450 Ack=117 Win=11564 Len=0 [13:25:31.484] lwip: tcp_output_segment: 346761:348193 (from lwip) [TCP Retransmission] [TCP segment of a reassembled PDU] [13:25:34.703] lwip: tcp_keepalive: sending KEEPALIVE probe to 10.200.0.1 (from lwip) [TCP Keep-Alive] [ACK] Seq=369450 Ack=117 Win=11564 Len=0 --- LwIP gives up after 15 seconds as configured in my project (3 keepalives with 5s interval): --- [13:25:39.734] lwip: tcp_slowtmr: KEEPALIVE timeout. Aborting connection to 10.200.0.1 [13:25:39.734] lwip: tcp_pcb_purge: not all data sent [13:25:39.734] lwip: tcp_pcb_purge: data left on ->unacked (from lwip) [RST, ACK] Seq=369451 Ack=117 Win=41005 Len=0 [13:25:39.734] lwip: lwip_tcp_err_callback, err=-13 --- Client sends ACK to the RST packet (so it's alive?): --- [13:25:39.734] lwip: ip_input: iphdr->dest 0x42d363a7 netif->ip_addr 0x200c80a (0xd063a7, 0xc80a, 0x42030000) (from client) [TCP Dup ACK 479#2] [ACK] Seq=117 Ack=340251 Win=64373 Len=0 LwIP sends the final [RST, ACK] after that. (from lwip) [RST, ACK] Seq=340251 Ack=117 Win=41005 Len=0