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
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) {
setupCoreForInternalUsage();
}
- UserId uid = _storage->internalUser();
+ UserId uid;
+ if(_storage) {
+ uid = _storage->internalUser();
+ } else {
+ qWarning() << "Core::setupInternalClientSession(): You're trying to run monolithic Quassel with an unusable Backend! Go fix it!";
+ return;
+ }
// Find or create session for validated user
SessionThread *sess;