X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=18f022b13cfcb07cc0bf06dddf2ca569647b415e;hp=56784298484bc64d8a98284a28cebc2fbd8ca5cf;hb=e042ae69dbe4f42e9e4441f4b5832cfe5ca89067;hpb=4bb04fc5758f566e58d560d6f8c510c5cb038486 diff --git a/src/core/core.cpp b/src/core/core.cpp index 56784298..18f022b1 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -547,6 +547,7 @@ void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) { clientInfo[socket] = msg; // store for future reference reply["MsgType"] = "ClientInitAck"; SignalProxy::writeDataToDevice(socket, reply); + socket->flush(); // ensure that the write cache is flushed before we switch to ssl #ifdef HAVE_SSL // after we told the client that we are ssl capable we switch to ssl mode @@ -653,6 +654,7 @@ void Core::setupClientSession(QTcpSocket *socket, UserId uid) { else sess = createSession(uid); // Hand over socket, session then sends state itself disconnect(socket, 0, this, 0); + socket->flush(); // ensure that the write cache is flushed before we hand over the connection to another thread. blocksizes.remove(socket); clientInfo.remove(socket); if(!sess) {