mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
log each setsockopt/SO_REUSEADDR failure
This commit is contained in:
parent
843f73ecaa
commit
c31438b2f2
@ -688,13 +688,16 @@ static curl_socket_t sockdaemon(curl_socket_t sock,
|
||||
int delay= 20;
|
||||
int attempt = 0;
|
||||
int error = 0;
|
||||
curl_socklen_t optlen;
|
||||
|
||||
do {
|
||||
attempt++;
|
||||
optlen = sizeof(flag);
|
||||
rc = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
|
||||
(void *)&flag, sizeof(flag));
|
||||
(void *)&flag, optlen);
|
||||
if(rc) {
|
||||
error = SOCKERRNO;
|
||||
logmsg("setsockopt/SO_REUSEADDR failed: (%d) %s", error, strerror(error));
|
||||
if(maxretr) {
|
||||
rc = wait_ms(delay);
|
||||
if(rc) {
|
||||
|
Loading…
Reference in New Issue
Block a user