Set SO_REUSEADDR on network sockets.

This commit is contained in:
Egor Vorontsov committed 2025-12-16 06:24:30 +03:00
1 parent c509698b54
commit 56b75aaffc
2 files changed
+10

No files matched your search

+5
View File
@@ -288,6 +288,11 @@ void NetworkServer::StartServer()
return;
}
/*---------------------------------------------------------*\
| Set socket options - reuse addr |
\*---------------------------------------------------------*/
setsockopt(server_sock[socket_count], SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));
/*---------------------------------------------------------*\
| Bind the server socket |
\*---------------------------------------------------------*/