aboutsummaryrefslogtreecommitdiff
path: root/firmwares/wifishield/wifiHD/src/ard_tcp.c
diff options
context:
space:
mode:
authorFederico Fissore <f.fissore@arduino.cc>2013-01-28 11:37:51 +0100
committerFederico Fissore <f.fissore@arduino.cc>2013-01-28 11:37:51 +0100
commit5c67c7e5c674a572dd99e9d0d8c19c718c9985bc (patch)
tree1f22ba2385ad22eca306d67793c0827451f2b50a /firmwares/wifishield/wifiHD/src/ard_tcp.c
parentc453e0a32e7adf5e7bab7bfb7c8f7a21e30ca563 (diff)
parentc6287dd6ac33544179a6544b8f3f55a396ec6608 (diff)
Merge branch 'ide-1.5.x' into lib-1.5
Diffstat (limited to 'firmwares/wifishield/wifiHD/src/ard_tcp.c')
-rw-r--r--firmwares/wifishield/wifiHD/src/ard_tcp.c3
1 files changed, 2 insertions, 1 deletions
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",