From 665b31165837d89ac9b64f9d9a540d0b87ae19e5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 24 May 2011 18:55:56 +0000 Subject: 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. --- src/tcpsocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tcpsocket.cpp') 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 ) { int nRead = TEMP_FAILURE_RETRY( bu_recv( nTcpSocket, (char *) pBuf, nBytes, 0 ) ); - if( nRead == 0 ) + if( nRead == 0 && nBytes > 0 ) { close(); throw TcpSocketException( TcpSocketException::cClosed, "TcpSocket closed."); -- cgit v1.2.3