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/socketengine.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/socketengine.cpp') diff --git a/src/socketengine.cpp b/src/socketengine.cpp index 6c99edc95..cbdfb5651 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -255,3 +255,17 @@ void SocketEngine::GetStats(float &kbitpersec_in, float &kbitpersec_out, float & kbitpersec_in = in_kbit / 1024; kbitpersec_out = out_kbit / 1024; } + +bool SocketEngine::IgnoreError() +{ + if (errno == EAGAIN) + return true; + +#ifdef _WIN32 + if (WSAGetLastError() == WSAEWOULDBLOCK) + return true; +#endif + + return false; +} + -- cgit v1.2.3