Don't set SO_REUSEADDR on Windows
This commit is contained in:
parent
00f13e41e7
commit
7f1c25a73b
@ -48,14 +48,15 @@ namespace fr
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//Set address re-use option
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
//Set address re-use option if not on Windows (potentially sketchy)
|
||||||
if(setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(int)) == SOCKET_ERROR)
|
if(setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(int)) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Set port re-use option
|
//Set port re-use option
|
||||||
#ifndef _WIN32
|
|
||||||
if(setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, (char*)&yes, sizeof(int)) == SOCKET_ERROR)
|
if(setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, (char*)&yes, sizeof(int)) == SOCKET_ERROR)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user