summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-15 12:59:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-15 12:59:45 +0000
commitbcc3e538236fdccc784f4d37449028315fbbc2f8 (patch)
treea2f705ad3842cce00a48a3106112bd836606d3fd /src/socket.cpp
parenta344c8a50792b385b2cf86c18a484e23433f5c1b (diff)
Made InspSocket::Read return an empty but non-NULL string when it receives EAGAIN (this method didnt know how to cope with EAGAIN before, may be causing random splits?)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2792 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 7147c263c..c20291453 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -162,8 +162,15 @@ char* InspSocket::Read()
}
else
{
- log(DEBUG,"EOF or error on socket");
- return NULL;
+ if (n == EAGAIN)
+ {
+ return "";
+ }
+ else
+ {
+ log(DEBUG,"EOF or error on socket");
+ return NULL;
+ }
}
}