diff options
Diffstat (limited to '')
-rw-r--r-- | src/tcpsocket.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tcpsocket.cpp b/src/tcpsocket.cpp index 105529a..399ec44 100644 --- a/src/tcpsocket.cpp +++ b/src/tcpsocket.cpp | |||
@@ -165,7 +165,7 @@ Bu::size Bu::TcpSocket::read( void *pBuf, Bu::size nBytes ) | |||
165 | { | 165 | { |
166 | int nRead = TEMP_FAILURE_RETRY( | 166 | int nRead = TEMP_FAILURE_RETRY( |
167 | bu_recv( nTcpSocket, (char *) pBuf, nBytes, 0 ) ); | 167 | bu_recv( nTcpSocket, (char *) pBuf, nBytes, 0 ) ); |
168 | if( nRead == 0 ) | 168 | if( nRead == 0 && nBytes > 0 ) |
169 | { | 169 | { |
170 | close(); | 170 | close(); |
171 | throw TcpSocketException( TcpSocketException::cClosed, "TcpSocket closed."); | 171 | throw TcpSocketException( TcpSocketException::cClosed, "TcpSocket closed."); |