Skip to content
Snippets Groups Projects
Commit c31438b2 authored by Yang Tse's avatar Yang Tse
Browse files

log each setsockopt/SO_REUSEADDR failure

parent 843f73ec
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment