mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Increased lwip connect timeout to 5 seconds by default
For very slow networks the previous default has be problematically shortpull/2231/head
							parent
							
								
									d82bbb1c40
								
							
						
					
					
						commit
						68365a9a59
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue