From 47332d6e9b990498dd35457090dd8983d8aae8d3 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 16 Apr 2013 03:34:58 -0500 Subject: Fix m_ssl_gnutls and perhaps some other things on Windows by recognizing WSAEWOULDBLOCK --- src/inspsocket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 27c6f87ec..d78ace318 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -200,7 +200,7 @@ void StreamSocket::DoRead() error = "Connection closed"; ServerInstance->SE->ChangeEventMask(this, FD_WANT_NO_READ | FD_WANT_NO_WRITE); } - else if (errno == EAGAIN) + else if (SocketEngine::IgnoreError()) { ServerInstance->SE->ChangeEventMask(this, FD_WANT_FAST_READ | FD_READ_WILL_BLOCK); } @@ -291,7 +291,7 @@ void StreamSocket::DoWrite() } else if (rv < 0) { - if (errno == EAGAIN || errno == EINTR) + if (errno == EINTR || SocketEngine::IgnoreError()) ServerInstance->SE->ChangeEventMask(this, FD_WANT_FAST_WRITE | FD_WRITE_WILL_BLOCK); else SetError(strerror(errno)); @@ -388,7 +388,7 @@ void StreamSocket::DoWrite() { error = "Connection closed"; } - else if (errno == EAGAIN) + else if (SocketEngine::IgnoreError()) { eventChange = FD_WANT_FAST_WRITE | FD_WRITE_WILL_BLOCK; } -- cgit v1.2.3