diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/socket.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index e206bb5..c4f914b 100644 --- a/src/socket.cpp +++ b/src/socket.cpp | |||
@@ -181,11 +181,12 @@ void Bu::Socket::read() | |||
181 | 181 | ||
182 | size_t Bu::Socket::read( void *pBuf, size_t nBytes ) | 182 | size_t Bu::Socket::read( void *pBuf, size_t nBytes ) |
183 | { | 183 | { |
184 | read(); | 184 | int nRead = TEMP_FAILURE_RETRY( ::read( nSocket, pBuf, nBytes ) ); |
185 | 185 | if( nRead < 0 ) | |
186 | 186 | { | |
187 | 187 | throw ConnectionException( excodeReadError, strerror(errno) ); | |
188 | return sReadBuf.getSize(); | 188 | } |
189 | return nRead; | ||
189 | } | 190 | } |
190 | 191 | ||
191 | size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) | 192 | size_t Bu::Socket::write( const void *pBuf, size_t nBytes ) |