X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.cpp;h=4b2824f56a7bccea089da3c5c813041ad23b7e40;hp=5942676f87b1ad7c8d0d9d7c1388a384bc1c8c8c;hb=4c4aec75c42dc212b6725cf1cb42ab61fb09e8fd;hpb=121a7a9291abd0f49aab836a47c8afcae66da18e diff --git a/src/core/coreauthhandler.cpp b/src/core/coreauthhandler.cpp index 5942676f..4b2824f5 100644 --- a/src/core/coreauthhandler.cpp +++ b/src/core/coreauthhandler.cpp @@ -68,6 +68,7 @@ void CoreAuthHandler::startSsl() qDebug() << qPrintable(tr("Starting encryption for Client:")) << _peer->description(); connect(sslSocket, SIGNAL(sslErrors(const QList &)), SLOT(onSslErrors())); + sslSocket->flush(); // ensure that the write cache is flushed before we switch to ssl (bug 682) sslSocket->startServerEncryption(); #endif } @@ -148,5 +149,6 @@ void CoreAuthHandler::handle(const Login &msg) disconnect(_peer, 0, this, 0); _peer->setParent(0); // Core needs to take care of this one now! + socket()->flush(); // Make sure all data is sent before handing over the peer (and socket) to the session thread (bug 682) emit handshakeComplete(_peer, uid); }