mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
check and warn about failure to set reuseaddr
This commit is contained in:
parent
a211bb4aee
commit
ab822a35a3
1 changed files with 5 additions and 2 deletions
|
@ -2672,8 +2672,11 @@ setNonBlocking(SOCKET fd)
|
|||
*/
|
||||
int status = 1;
|
||||
|
||||
setsockopt([self _sock], SOL_SOCKET, SO_REUSEADDR,
|
||||
(char *)&status, (OPTLEN)sizeof(status));
|
||||
if (setsockopt([self _sock], SOL_SOCKET, SO_REUSEADDR,
|
||||
(char *)&status, (OPTLEN)sizeof(status)) < 0)
|
||||
{
|
||||
NSDebugMLLog(@"GSTcpTune", @"setsockopt reuseaddr failed");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue