summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@blackberry.com>2013-04-04 11:30:43 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 23:22:43 +0200
commite145b67fbd54f147dab0f8e460280a9c8533aa7b (patch)
tree957a2fbba25b66036cc415e5964ec8f3ad772b77 /tests
parent34673203788dad6817fe1aaa21ca7432a32330d3 (diff)
SSL internals: do not write after shutting down the socket
... but rather throw an error, so the HTTP layer can recover from a SSL shutdown gracefully. In case the other side sent us a shutdown, we should not send one as well, as it results in an error. Change-Id: Ie7a56cf3008b6ead912aade18dbec67846e2a87e Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index feb6978690..f3adb2b52f 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -2135,7 +2135,8 @@ void tst_QSslSocket::writeBigChunk()
QFAIL("Error while writing! Check if the OpenSSL BIO size is limited?!");
}
// also check the error string. If another error (than UnknownError) occurred, it should be different than before
- QVERIFY(errorBefore == errorAfter);
+ QVERIFY2(errorBefore == errorAfter || socket->error() == QAbstractSocket::RemoteHostClosedError,
+ QByteArray("unexpected error: ").append(qPrintable(errorAfter)));
// check that everything has been written to OpenSSL
QVERIFY(socket->bytesToWrite() == 0);