fix bind issue in W

This commit is contained in:
Sergio R. Caprile committed 2023-05-22 19:13:48 -03:00
1 parent 45e4b3c423
commit ab10b042be
3 files changed
+6 -6

No files matched your search

+1 -2
View File
@@ -198,8 +198,7 @@ bool mg_open_listener(struct mg_connection *c, const char *url) {
(char *) &on, sizeof(on))) != 0) {
// "Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE"
MG_ERROR(("setsockopt(SO_EXCLUSIVEADDRUSE): %d %d", on, MG_SOCK_ERR(rc)));
#endif
#if defined(SO_REUSEADDR) && (!defined(LWIP_SOCKET) || SO_REUSE)
#elif defined(SO_REUSEADDR) && (!defined(LWIP_SOCKET) || SO_REUSE)
} else if ((rc = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &on,
sizeof(on))) != 0) {
// 1. SO_REUSEADDR semantics on UNIX and Windows is different. On