src/network/socket/qnativesocketengine.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
equal deleted inserted replaced
4:3b1da2848fc7 5:d3bac044e0f0
   776     if (readBytes == 0 && d->socketType == QAbstractSocket::TcpSocket) {
   776     if (readBytes == 0 && d->socketType == QAbstractSocket::TcpSocket) {
   777         d->setError(QAbstractSocket::RemoteHostClosedError,
   777         d->setError(QAbstractSocket::RemoteHostClosedError,
   778                     QNativeSocketEnginePrivate::RemoteHostClosedErrorString);
   778                     QNativeSocketEnginePrivate::RemoteHostClosedErrorString);
   779         close();
   779         close();
   780         return -1;
   780         return -1;
       
   781     } else if (readBytes == -1) {
       
   782         if (!d->hasSetSocketError) {
       
   783             d->hasSetSocketError = true;
       
   784             d->socketError = QAbstractSocket::NetworkError;
       
   785             d->socketErrorString = qt_error_string();
       
   786         }
       
   787         close();
       
   788         return -1;
   781     }
   789     }
   782     return readBytes;
   790     return readBytes;
   783 }
   791 }
   784 
   792 
   785 /*!
   793 /*!