setsockopt() will return -1 on error, not 0.
Pointy hat to: Jeremie Le Hen
This commit is contained in:
parent
20c0b2d3c3
commit
c825862e6c
@ -2568,7 +2568,7 @@ socksetup(int af, const char *bindhostname)
|
||||
}
|
||||
}
|
||||
if (setsockopt(*s, SOL_SOCKET, SO_REUSEADDR,
|
||||
(char *)&on, sizeof (on)) < 1) {
|
||||
(char *)&on, sizeof (on)) < 0) {
|
||||
logerror("setsockopt");
|
||||
close(*s);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user