diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-02 07:54:03 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-08-02 07:54:03 +0000 |
commit | d875d5e2fc66b9a4ab1afea8441b33d4afc6e9b5 (patch) | |
tree | da084fd38c0a2689f57fc98385f346beb9ac9906 /src/network | |
parent | a9603ef7d42c15090d86d04d1bc6aaf684257862 (diff) | |
parent | f6fc34294f5691da8aa7ab8dc0452c6fa9036b67 (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.cpp | 13 |
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) |