diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2011-03-16 12:06:08 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2011-03-16 12:17:05 (GMT) |
commit | 76f84c7a91751b4ddc5d9c4c59b6e5158d7ea998 (patch) | |
tree | 0e2fd04e628af65a8b0c3144a4612496a30904b4 /src/network/socket/qabstractsocket.cpp | |
parent | e81c9e62f2052f2584d67827c88a0578fa2e3fab (diff) | |
download | Qt-76f84c7a91751b4ddc5d9c4c59b6e5158d7ea998.zip Qt-76f84c7a91751b4ddc5d9c4c59b6e5158d7ea998.tar.gz Qt-76f84c7a91751b4ddc5d9c4c59b6e5158d7ea998.tar.bz2 |
QTcpSocket: Fix for disconnect in Unbuffered mode.
We need to set the state properly after we have been disconnected.
Also fix the HTTP layer, it needs to handle the disconnect
when reading.
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/socket/qabstractsocket.cpp')
-rw-r--r-- | src/network/socket/qabstractsocket.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 2a942cc..c7c2e82 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -2210,6 +2210,8 @@ qint64 QAbstractSocket::readData(char *data, qint64 maxSize) } else if (readBytes < 0) { d->socketError = d->socketEngine->error(); setErrorString(d->socketEngine->errorString()); + d->resetSocketLayer(); + d->state = QAbstractSocket::UnconnectedState; } else if (!d->socketEngine->isReadNotificationEnabled()) { // Only do this when there was no error d->socketEngine->setReadNotificationEnabled(true); |