[ccan] [PATCH] net: fix ipv4 immediate connect

Cody P Schafer devel at codyps.com
Sun Jan 26 13:23:33 EST 2014


---
 ccan/net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ccan/net/net.c b/ccan/net/net.c
index d2eaa9e..9012ccc 100644
--- a/ccan/net/net.c
+++ b/ccan/net/net.c
@@ -116,7 +116,7 @@ int net_connect_async(const struct addrinfo *addrinfo, struct pollfd pfds[2])
 				close_noerr(pfds[i].fd);
 				return -1;
 			}
-			return pfds[0].fd;
+			return pfds[i].fd;
 		}
 	}
 
-- 
1.8.5.3



More information about the ccan mailing list