mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Fix #5984: Allow socket binding to same port after crash
This commit is contained in:
committed by
Michael Steenbeek
parent
fabf7f9fb5
commit
424f2fcef5
@@ -147,6 +147,12 @@ public:
|
||||
log_error("IPV6_V6ONLY failed. %d", LAST_SOCKET_ERROR());
|
||||
}
|
||||
|
||||
value = 1;
|
||||
if (setsockopt(_socket, SOL_SOCKET, SO_REUSEADDR, (const char*)&value, sizeof(value)) != 0)
|
||||
{
|
||||
log_error("SO_REUSEADDR failed. %d", LAST_SOCKET_ERROR());
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// Bind to address:port and listen
|
||||
|
||||
Reference in New Issue
Block a user