Permalink
Browse files

add SO_REUSPORT option

  • Loading branch information...
wilberforce committed Jun 4, 2018
1 parent fb2c99c commit 5c9c7b5c561eda7408b2e5d8194f8127a6a5d5f6
Showing with 2 additions and 2 deletions.
  1. +2 −2 libs/network/esp32/network_esp32.c
@@ -132,8 +132,8 @@ int net_esp32_createsocket(JsNetwork *net, SocketType socketType, uint32_t host,
if (setsockopt(sckt,SOL_SOCKET,SO_REUSEADDR,(const char *)&optval,sizeof(optval)) < 0)
jsWarn("setsockopt(SO_REUSADDR) failed\n");
#ifdef SO_REUSEPORT
// if (setsockopt(sckt,SOL_SOCKET,SO_REUSEPORT,(const char *)&optval,sizeof(optval)) < 0)
// jsWarn("setsockopt(SO_REUSPORT) failed\n");
if (setsockopt(sckt,SOL_SOCKET,SO_REUSEPORT,(const char *)&optval,sizeof(optval)) < 0)
jsWarn("setsockopt(SO_REUSPORT) failed\n");
#endif
}

0 comments on commit 5c9c7b5

Please sign in to comment.