From 1e17a3c3df5f9d265e42f3ee46813ee096718ec6 Mon Sep 17 00:00:00 2001 From: Henrik Nordstrom Date: Fri, 14 May 2010 05:58:00 +0200 Subject: [PATCH] Cleanup patch --- src/comm.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/comm.cc b/src/comm.cc index b453dfd482..30931d3a6d 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -980,7 +980,9 @@ ConnectStateData::commResetFD() struct addrinfo *AI = NULL; F->local_addr.GetAddrInfo(AI); - int fd2 = socket(AI->ai_family, AI->ai_socktype, AI->ai_protocol); + int new_family = AI->ai_family; + + int fd2 = socket(new_family, AI->ai_socktype, AI->ai_protocol); if (fd2 < 0) { debugs(5, DBG_CRITICAL, HERE << "WARNING: FD " << fd2 << " socket failed to allocate: " << xstrerror()); @@ -1015,7 +1017,8 @@ ConnectStateData::commResetFD() close(fd2); - F->sock_family = AI->ai_family; + /* INET6: copy the new sockets family type to the FDE table */ + F->sock_family = new_family; F->flags.called_connect = 0; -- 2.47.3