diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-05-24 18:55:56 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-05-24 18:55:56 +0000 |
commit | 665b31165837d89ac9b64f9d9a540d0b87ae19e5 (patch) | |
tree | 4da55e3e623f0687ed841df15f1567f5f0f8d091 /src/tcpsocket.cpp | |
parent | 166886978475125c86ae7a58ac9358cd52758d54 (diff) | |
download | libbu++-665b31165837d89ac9b64f9d9a540d0b87ae19e5.tar.gz libbu++-665b31165837d89ac9b64f9d9a540d0b87ae19e5.tar.bz2 libbu++-665b31165837d89ac9b64f9d9a540d0b87ae19e5.tar.xz libbu++-665b31165837d89ac9b64f9d9a540d0b87ae19e5.zip |
Added some empty files that will become my new random number generator system,
also fixed a bug in TcpSocket that caused the system to think the socket was
closed when it just connected too quickly.
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."); |