Trying to fix SIGPIPE issue on server (linux).
This commit is contained in:
@@ -183,6 +183,11 @@ ServerAcceptThread::AcceptLoop()
|
||||
{
|
||||
throw ServerException(__FILE__, __LINE__, ERR_SOCK_ACCEPT_FAILED, SOCKET_ERRNO());
|
||||
}
|
||||
unsigned long mode = 1;
|
||||
if (IOCTLSOCKET(tmpData->GetSocket(), FIONBIO, &mode) == SOCKET_ERROR)
|
||||
{
|
||||
throw ServerException(__FILE__, __LINE__, ERR_SOCK_CREATION_FAILED, SOCKET_ERRNO());
|
||||
}
|
||||
// Optional call - don't check return value.
|
||||
// Enable keepalive - won't be of much use but better than nothing.
|
||||
int keepalive = 1;
|
||||
|
||||
Reference in New Issue
Block a user