mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-06-09 00:42:51 -04:00
Correctly report TCP connection timeout on windows.
On nonblocking TCP connects, we set status = ETIMEOUT on failure. On windows, depending on which header files are included, ETIMEOUT is defined differently, and this leads to incomprehensible error messages - so, always use WSAETIMEDOUT here. Trac #651 Signed-off-by: Leonardo Basilio <leobasilio@gmail.com> Acked-by: Arne Schwabe <arne@rfc2549.org> Message-Id: <CACqLfMnBXwSY=MXyc7B1oMKwYE2Z_49G3mpkEPxbSAuG61tgZA@mail.gmail.com> URL: http://article.gmane.org/gmane.network.openvpn.devel/11085 Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
15f78acfae
commit
5f5229e41d
1 changed files with 4 additions and 0 deletions
|
|
@ -1177,7 +1177,11 @@ openvpn_connect (socket_descriptor_t sd,
|
|||
{
|
||||
if (--connect_timeout < 0)
|
||||
{
|
||||
#ifdef WIN32
|
||||
status = WSAETIMEDOUT;
|
||||
#else
|
||||
status = ETIMEDOUT;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
openvpn_sleep (1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue