diff --git a/libraries/ESP8266WiFi/src/WiFiServer.cpp b/libraries/ESP8266WiFi/src/WiFiServer.cpp index dd7967869d..b17899e1e9 100644 --- a/libraries/ESP8266WiFi/src/WiFiServer.cpp +++ b/libraries/ESP8266WiFi/src/WiFiServer.cpp @@ -64,6 +64,7 @@ void WiFiServer::begin() { ip_addr_t local_addr; local_addr.addr = (uint32_t) _addr; + pcb->so_options |= SOF_REUSEADDR; err = tcp_bind(pcb, &local_addr, _port); if (err != ERR_OK) { diff --git a/tools/sdk/lib/liblwip_gcc.a b/tools/sdk/lib/liblwip_gcc.a index 5ddb446905..6006179d89 100644 Binary files a/tools/sdk/lib/liblwip_gcc.a and b/tools/sdk/lib/liblwip_gcc.a differ diff --git a/tools/sdk/lwip/include/lwipopts.h b/tools/sdk/lwip/include/lwipopts.h index f16b424c00..c163ac625c 100644 --- a/tools/sdk/lwip/include/lwipopts.h +++ b/tools/sdk/lwip/include/lwipopts.h @@ -1458,7 +1458,7 @@ * SO_REUSE==1: Enable SO_REUSEADDR option. */ #ifndef SO_REUSE -#define SO_REUSE 0 +#define SO_REUSE 1 #endif /**