equal
deleted
inserted
replaced
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 /*! |