summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
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)