QSslSocket: try to send all data on close()

Takes care about unencrypted data in the socket writeBuffer when
close() flushes the output.

Change-Id: I301f41ea709817e215ee4246a3951e3182d94fbd
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Alex Trotsenko 2015-01-16 14:48:08 +02:00
parent 19a91b4a35
commit 633b950bd4

View File

@ -764,7 +764,7 @@ void QSslSocket::close()
qCDebug(lcSsl) << "QSslSocket::close()";
#endif
Q_D(QSslSocket);
if (encryptedBytesToWrite())
if (encryptedBytesToWrite() || !d->writeBuffer.isEmpty())
flush();
if (d->plainSocket)
d->plainSocket->close();