Set SO_NOSIGPIPE on proper socket.

This commit is contained in:
Bartosz Taudul 2017-11-03 11:20:39 +01:00
parent f71af873c0
commit a2f9dc75c7

View File

@ -253,7 +253,7 @@ Socket* ListenSocket::Accept()
int sock = accept( m_sock, (sockaddr*)&remote, &sz); int sock = accept( m_sock, (sockaddr*)&remote, &sz);
#if defined __APPLE__ #if defined __APPLE__
int val = 1; int val = 1;
setsockopt( m_sock, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof( val ) ); setsockopt( sock, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof( val ) );
#endif #endif
if( sock == -1 ) if( sock == -1 )
{ {