Fix #1550 - excladdrinuse

This commit is contained in:
Sergey Lyubka committed 2022-05-21 16:18:34 +01:00
1 parent ef563603a9
commit d5993ba27e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -237,7 +237,7 @@ bool mg_open_listener(struct mg_connection *c, const char *url) {
// but won't work! (setsockopt will return EINVAL)
MG_ERROR(("reuseaddr: %d", MG_SOCK_ERRNO));
#endif
#if MG_ARCH == MG_ARCH_WIN32 && defined(SO_EXCLUSIVEADDRUSE) && !defined(WINCE)
#if MG_ARCH == MG_ARCH_WIN32 && !defined(SO_EXCLUSIVEADDRUSE) && !defined(WINCE)
} else if (setsockopt(fd, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (char *) &on,
sizeof(on)) != 0) {
// "Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE"