From a400fd3cd5915f34b6e49e2477acfa43d64733a4 Mon Sep 17 00:00:00 2001 From: mlf Date: Tue, 23 Oct 2012 22:27:53 +0200 Subject: Issue #9: Connection dies after a few seconds Issue 1024: TCP connections die after few seconds of inactivity --- firmwares/wifishield/wifiHD/src/ard_tcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'firmwares/wifishield/wifiHD/src') diff --git a/firmwares/wifishield/wifiHD/src/ard_tcp.c b/firmwares/wifishield/wifiHD/src/ard_tcp.c index dad1c3e..b70549a 100644 --- a/firmwares/wifishield/wifiHD/src/ard_tcp.c +++ b/firmwares/wifishield/wifiHD/src/ard_tcp.c @@ -334,7 +334,8 @@ void ack_recved(void* pcb, int len) { static err_t atcp_poll(void *arg, struct tcp_pcb *pcb) { struct ttcp* _ttcp = arg; - ++tcp_poll_retries; + if ((_ttcp) && (_ttcp->left>0)) + ++tcp_poll_retries; if (tcp_poll_retries > 4) { WARN("ARD TCP [%p] arg=%p retries=%d\n", -- cgit v1.2.3-18-g5258