ccan/io: fix io_connect.
getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len) gives err == ECONNREFUSED
when connection is refused. Handle this (and other error cases).
And we need F_SETFL not F_SETFD to restore blocking on the socket!
Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au>
Showing
Please register or sign in to comment