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:
parent
19a91b4a35
commit
633b950bd4
@ -764,7 +764,7 @@ void QSslSocket::close()
|
|||||||
qCDebug(lcSsl) << "QSslSocket::close()";
|
qCDebug(lcSsl) << "QSslSocket::close()";
|
||||||
#endif
|
#endif
|
||||||
Q_D(QSslSocket);
|
Q_D(QSslSocket);
|
||||||
if (encryptedBytesToWrite())
|
if (encryptedBytesToWrite() || !d->writeBuffer.isEmpty())
|
||||||
flush();
|
flush();
|
||||||
if (d->plainSocket)
|
if (d->plainSocket)
|
||||||
d->plainSocket->close();
|
d->plainSocket->close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user