summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ebc67c3)
If one connect failed, we'd return the other one without
waiting for the connect to complete. This resulted in
read() returning 0, which was really weird.
The downside: the poll doesn't seem to time out when the
connect times out (Linux 3.13 x86-64).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+ if (!(pfds[i].revents & POLLOUT))
+ continue;
+
if (getsockopt(pfds[i].fd, SOL_SOCKET, SO_ERROR, &err,
&errlen) != 0) {
net_connect_abort(pfds);
if (getsockopt(pfds[i].fd, SOL_SOCKET, SO_ERROR, &err,
&errlen) != 0) {
net_connect_abort(pfds);