Browse Source

net: fix ipv4 immediate connect

Cody P Schafer 12 years ago
parent
commit
ac7f557560
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/net/net.c

+ 1 - 1
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;
 		}
 	}