fix opening tcp server on macos

This commit is contained in:
MihailRis 2025-09-14 13:45:07 +03:00
parent ee663fa322
commit f531d2e358

View File

@ -590,7 +590,7 @@ public:
}
int opt = 1;
int flags = SO_REUSEADDR;
# ifndef _WIN32
# if !defined(_WIN32) && !defined(__APPLE__)
flags |= SO_REUSEPORT;
# endif
if (setsockopt(descriptor, SOL_SOCKET, flags, (const char*)&opt, sizeof(opt))) {