Skip to content

Commit

Permalink
Enable SO_REUSE in LwIP and WiFiServer (#1431)
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Jun 12, 2016
1 parent 0f0386e commit 7ff36a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions libraries/ESP8266WiFi/src/WiFiServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Binary file modified tools/sdk/lib/liblwip_gcc.a
Binary file not shown.
2 changes: 1 addition & 1 deletion tools/sdk/lwip/include/lwipopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@
* SO_REUSE==1: Enable SO_REUSEADDR option.
*/
#ifndef SO_REUSE
#define SO_REUSE 0
#define SO_REUSE 1
#endif

/**
Expand Down

0 comments on commit 7ff36a7

Please sign in to comment.