diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-08-18 06:33:09 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-08-18 06:34:12 (GMT) |
commit | f30e54f2e8f89ca2c92032457a98b3f98010ba44 (patch) | |
tree | 30da13df4d7bebd6d5f114cf477eb74e5507367e /src/network/ssl | |
parent | 95cb2bb6cbdf2dcc0a035105104a4c08ecc43e83 (diff) | |
download | Qt-f30e54f2e8f89ca2c92032457a98b3f98010ba44.zip Qt-f30e54f2e8f89ca2c92032457a98b3f98010ba44.tar.gz Qt-f30e54f2e8f89ca2c92032457a98b3f98010ba44.tar.bz2 |
QSslSocket: Clear readBuffer and writeBuffer on close()
Fixes https://bugs.webkit.org/show_bug.cgi?id=28016
Reviewed-by: andreas
Diffstat (limited to 'src/network/ssl')
-rw-r--r-- | src/network/ssl/qsslsocket.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index e8ae33d..1acd88b 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -653,7 +653,16 @@ void QSslSocket::close() #ifdef QSSLSOCKET_DEBUG qDebug() << "QSslSocket::close()"; #endif + Q_D(QSslSocket); QTcpSocket::close(); + + // must be cleared, reading/writing not possible on closed socket: + d->readBuffer.clear(); + d->writeBuffer.clear(); + // for QTcpSocket this is already done because it uses the readBuffer/writeBuffer + // if the QIODevice it is based on + // ### FIXME QSslSocket should probably do similar instead of having + // its own readBuffer/writeBuffer } /*! |