Skip to content

Commit 9dd7910

Browse files
authored
Enable SO_REUSE in LwIP and WiFiServer (#1431) (#2140)
1 parent 0f0386e commit 9dd7910

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

libraries/ESP8266WiFi/src/WiFiServer.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ void WiFiServer::begin() {
6464

6565
ip_addr_t local_addr;
6666
local_addr.addr = (uint32_t) _addr;
67+
pcb->so_options |= SOF_REUSEADDR;
6768
err = tcp_bind(pcb, &local_addr, _port);
6869

6970
if (err != ERR_OK) {

tools/sdk/lib/liblwip_gcc.a

2.94 KB
Binary file not shown.

tools/sdk/lwip/include/lwipopts.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@
14581458
* SO_REUSE==1: Enable SO_REUSEADDR option.
14591459
*/
14601460
#ifndef SO_REUSE
1461-
#define SO_REUSE 0
1461+
#define SO_REUSE 1
14621462
#endif
14631463

14641464
/**

0 commit comments

Comments
 (0)