Thanks.
I think this is the simplest solution to this issue.
On Tue, Jul 17, 2012 at 7:19 PM, Heiko Hund <heiko.h...@sophos.com> wrote:
> Instead of EINPROGRESS WinSock2 returns WSAEWOULDBLOCK if a non-blocking
> connect(2) cannot be completed immediately.
>
> Signed-off-by: Heiko Hund <heiko.h...@sophos.com>
> ---
> src/openvpn/socket.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
> index 54ebce7..02e2768 100644
> --- a/src/openvpn/socket.c
> +++ b/src/openvpn/socket.c
> @@ -1165,7 +1165,13 @@ openvpn_connect (socket_descriptor_t sd,
> status = connect (sd, &remote->addr.sa,
> af_addr_size(remote->addr.sa.sa_family));
> if (status)
> status = openvpn_errno_socket ();
> - if (status == EINPROGRESS)
> + if (
> +#ifdef WIN32
> + status == WSAEWOULDBLOCK
> +#else
> + status == EINPROGRESS
> +#endif
> + )
> {
> while (true)
> {
> --
> 1.7.9
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel