diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index c8a6e760d..0de386ffd 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -1428,11 +1428,10 @@ bool tcpiiu::bytesArePendingInOS () const osiSockIoctl_t bytesPending = 0; /* shut up purifys yapping */ int status = socket_ioctl ( this->sock, // X aCC 392 FIONREAD, & bytesPending ); - if ( status ) { - return false; - } - if ( bytesPending > 0 ) { - return true; + if ( status >= 0 ) { + if ( bytesPending > 0 ) { + return true; + } } return false; #endif