fix opening tcp server on macos
This commit is contained in:
parent
ee663fa322
commit
f531d2e358
@ -590,7 +590,7 @@ public:
|
|||||||
}
|
}
|
||||||
int opt = 1;
|
int opt = 1;
|
||||||
int flags = SO_REUSEADDR;
|
int flags = SO_REUSEADDR;
|
||||||
# ifndef _WIN32
|
# if !defined(_WIN32) && !defined(__APPLE__)
|
||||||
flags |= SO_REUSEPORT;
|
flags |= SO_REUSEPORT;
|
||||||
# endif
|
# endif
|
||||||
if (setsockopt(descriptor, SOL_SOCKET, flags, (const char*)&opt, sizeof(opt))) {
|
if (setsockopt(descriptor, SOL_SOCKET, flags, (const char*)&opt, sizeof(opt))) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user