summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-02 07:54:03 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-08-02 07:54:03 +0000
commitd875d5e2fc66b9a4ab1afea8441b33d4afc6e9b5 (patch)
treeda084fd38c0a2689f57fc98385f346beb9ac9906 /src/network
parenta9603ef7d42c15090d86d04d1bc6aaf684257862 (diff)
parentf6fc34294f5691da8aa7ab8dc0452c6fa9036b67 (diff)
Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qabstractsocket.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 0615cd1cb3..fbc7088a02 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -2657,9 +2657,8 @@ void QAbstractSocket::setPeerName(const QString &name)
}
/*!
- Closes the I/O device for the socket, disconnects the socket's connection with the
- host, closes the socket, and resets the name, address, port number and underlying
- socket descriptor.
+ Closes the I/O device for the socket and calls disconnectFromHost()
+ to close the socket's connection.
See QIODevice::close() for a description of the actions that occur when an I/O
device is closed.
@@ -2675,13 +2674,6 @@ void QAbstractSocket::close()
QIODevice::close();
if (d->state != UnconnectedState)
disconnectFromHost();
-
- d->localPort = 0;
- d->peerPort = 0;
- d->localAddress.clear();
- d->peerAddress.clear();
- d->peerName.clear();
- d->cachedSocketDescriptor = -1;
}
/*!
@@ -2784,6 +2776,7 @@ void QAbstractSocket::disconnectFromHost()
d->peerPort = 0;
d->localAddress.clear();
d->peerAddress.clear();
+ d->peerName.clear();
d->setWriteChannelCount(0);
#if defined(QABSTRACTSOCKET_DEBUG)