Core/Networking: Set SO_REUSEADDR on *nix platforms

This commit is contained in:
jackpoz authored and Ovahlord committed 2020-05-06 00:01:17 +02:00
1 parent 9d0bfc0c56
commit 03609506ae
2 files changed
+13

No files matched your search

@@ -83,6 +83,15 @@ public:
return false;
}
#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
_acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true), errorCode);
if (errorCode)
{
TC_LOG_INFO("network", "Failed to set reuse_address option on acceptor %s", errorCode.message().c_str());
return false;
}
#endif
_acceptor.bind(_endpoint, errorCode);
if (errorCode)
{