X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresession.cpp;h=020950f6de73ee110f10f1ba6ed4da3d65023848;hp=f287ac208396f09e1df1614fced85b6e85b05f7f;hb=0d49f7e83bd1055711e66aa880f3a0d62f7eefc9;hpb=6efa7d5a4cd38bc21ecfafd04d25a6c952d1e097;ds=sidebyside diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index f287ac20..020950f6 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -233,6 +233,9 @@ void CoreSession::addClient(QIODevice *device) { if(!device) { quError() << "Invoking CoreSession::addClient with a QObject that is not a QIODevice!"; } else { + // if the socket is an orphan, the signalProxy adopts it. + // -> we don't need to care about it anymore + device->setParent(0); signalProxy()->addPeer(device); QVariantMap reply; reply["MsgType"] = "SessionInit"; @@ -250,7 +253,6 @@ void CoreSession::removeClient(QIODevice *iodev) { QTcpSocket *socket = qobject_cast(iodev); if(socket) quInfo() << qPrintable(tr("Client")) << qPrintable(socket->peerAddress().toString()) << qPrintable(tr("disconnected (UserId: %1).").arg(user().toInt())); - iodev->deleteLater(); } SignalProxy *CoreSession::signalProxy() const {