diff options
Diffstat (limited to 'src/network/ssl/qsslsocket_winrt.cpp')
-rw-r--r-- | src/network/ssl/qsslsocket_winrt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_winrt.cpp b/src/network/ssl/qsslsocket_winrt.cpp index 53a8a8b61b..e72edcbc52 100644 --- a/src/network/ssl/qsslsocket_winrt.cpp +++ b/src/network/ssl/qsslsocket_winrt.cpp @@ -647,6 +647,10 @@ HRESULT QSslSocketBackendPrivate::onSslUpgrade(IAsyncAction *action, AsyncStatus connectionEncrypted = true; emit q->encrypted(); + // The write buffer may already have data written to it, so we need to call transmit. + // This has to be done in 'q's thread, and not in the current thread (the XAML thread). + QMetaObject::invokeMethod(q, [this](){ transmit(); }); + if (pendingClose) { pendingClose = false; q->disconnectFromHost(); |