From 8f29e7be04b6f2890b47c03d7c76a1726d3f2f73 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 13 Jan 2009 00:02:21 +0000 Subject: Fixed an out there corner case in Bu::Socket::read where it would get an EAGAIN errno out of ::read for no apparent reason. Now it treats it as expected, it just returns zero bytes read. --- src/socket.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/socket.cpp b/src/socket.cpp index ce16794..77485aa 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -203,6 +203,8 @@ size_t Bu::Socket::read( void *pBuf, size_t nBytes ) #endif if( nRead < 0 ) { + if( errno == EAGAIN ) + return 0; throw SocketException( SocketException::cRead, strerror(errno) ); } return nRead; -- cgit v1.2.3