Merge "res_send: Avoid spurious close()s and (rare) failure"
This commit is contained in:
commit
eae1f1fba3
@ -413,7 +413,7 @@ res_nsend(res_state statp,
|
||||
if (EXT(statp).nssocks[ns] == -1)
|
||||
continue;
|
||||
peerlen = sizeof(peer);
|
||||
if (getsockname(EXT(statp).nssocks[ns],
|
||||
if (getpeername(EXT(statp).nssocks[ns],
|
||||
(struct sockaddr *)(void *)&peer, &peerlen) < 0) {
|
||||
needclose++;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user