]> git.ozlabs.org Git - ccan/commitdiff
net: fix ipv4 immediate connect
authorCody P Schafer <devel@codyps.com>
Sun, 26 Jan 2014 02:23:13 +0000 (18:23 -0800)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 24 Apr 2014 06:51:38 +0000 (16:21 +0930)
ccan/net/net.c

index 394c4e49f2bb16024ea576b0aa68ed1376c25bcc..4c84ba7ac3b1702ac0467bb7e3fd29244eecf298 100644 (file)
@@ -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;
                }
        }