summaryrefslogtreecommitdiff
path: root/src/socketengine.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-16 03:34:58 -0500
committerAdam <Adam@anope.org>2013-04-16 18:19:42 -0500
commit47332d6e9b990498dd35457090dd8983d8aae8d3 (patch)
tree5f298a5093f16ab7b349dd817d26ec9b98f67dac /src/socketengine.cpp
parent1dfead3b2cc9e8c603f6ad6f7216576a2ce361fb (diff)
Fix m_ssl_gnutls and perhaps some other things on Windows by recognizing WSAEWOULDBLOCK
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r--src/socketengine.cpp14
1 files changed, 14 insertions, 0 deletions
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;
+}
+