Check for writability when waiting for a socket to finish connecting.
authorGuus Sliepen <guus@tinc-vpn.org>
Wed, 6 Feb 2013 14:12:53 +0000 (15:12 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Wed, 6 Feb 2013 14:12:53 +0000 (15:12 +0100)
commit053af97c9e729ab485609e4202f5195fdc8aeeb5
tree573381561b526860308502ad997ea416ec502300
parent1135669b3c6820f5473ea451a58865f552ba768f
Check for writability when waiting for a socket to finish connecting.

We were checking only for readability, which is not a problem for normal
connections, since the server side of a connection will always send an ID
request. But when using a proxy, the proxy server doesn't send anything before
the client, so tinc would not see that its connection to the proxy had already
been established.
src/net.c
src/net_socket.c