diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2009-01-13 00:02:21 +0000 | 
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2009-01-13 00:02:21 +0000 | 
| commit | 8f29e7be04b6f2890b47c03d7c76a1726d3f2f73 (patch) | |
| tree | 5d58006991748eae6abe17d996a6b4b0f7ca8d16 | |
| parent | d236dc89dd5725396c415402af6bc18bb44624a5 (diff) | |
| download | libbu++-8f29e7be04b6f2890b47c03d7c76a1726d3f2f73.tar.gz libbu++-8f29e7be04b6f2890b47c03d7c76a1726d3f2f73.tar.bz2 libbu++-8f29e7be04b6f2890b47c03d7c76a1726d3f2f73.tar.xz libbu++-8f29e7be04b6f2890b47c03d7c76a1726d3f2f73.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | src/socket.cpp | 2 | 
1 files changed, 2 insertions, 0 deletions
| 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 ) | |||
| 203 | #endif | 203 | #endif | 
| 204 | if( nRead < 0 ) | 204 | if( nRead < 0 ) | 
| 205 | { | 205 | { | 
| 206 | if( errno == EAGAIN ) | ||
| 207 | return 0; | ||
| 206 | throw SocketException( SocketException::cRead, strerror(errno) ); | 208 | throw SocketException( SocketException::cRead, strerror(errno) ); | 
| 207 | } | 209 | } | 
| 208 | return nRead; | 210 | return nRead; | 
