From b7c8060edb49abbe3a56edc9c3c01225aabd7c18 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Fri, 10 Jun 2016 00:01:27 -0500 Subject: [PATCH] Increased lwip connect timeout to 5 seconds by default For very slow networks the previous default has be problematically short --- net/LWIPInterface/LWIPInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/LWIPInterface/LWIPInterface.cpp b/net/LWIPInterface/LWIPInterface.cpp index 5edead76fc..1b7b01d754 100644 --- a/net/LWIPInterface/LWIPInterface.cpp +++ b/net/LWIPInterface/LWIPInterface.cpp @@ -110,7 +110,7 @@ int LWIPInterface::connect() // Wait for an IP Address // -1: error, 0: timeout - if (netif_up.wait(2500) <= 0) { + if (netif_up.wait(15000) <= 0) { return NSAPI_ERROR_DHCP_FAILURE; } @@ -294,7 +294,7 @@ int LWIPInterface::socket_connect(void *handle, const SocketAddress &addr) err_t err = tcp_connect(s->tcp, &ip_addr, addr.get_port(), tcp_connect_irq); // Wait for connection - if (err || connected.wait(1500) <= 0) { + if (err || connected.wait(15000) <= 0) { return NSAPI_ERROR_NO_CONNECTION; }