From: Daniel Albers Date: Mon, 6 Jan 2014 14:27:12 +0000 (+0100) Subject: set SO_KEEPALIVE on client sockets X-Git-Tag: 0.10-beta1~52 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=ac6b164b8b758deff3ebc3946177988e6d72ca9a;ds=sidebyside set SO_KEEPALIVE on client sockets --- diff --git a/src/client/clientauthhandler.cpp b/src/client/clientauthhandler.cpp index b122e2f4..8fc2a731 100644 --- a/src/client/clientauthhandler.cpp +++ b/src/client/clientauthhandler.cpp @@ -144,6 +144,8 @@ void ClientAuthHandler::onSocketConnected() return; } + socket()->setSocketOption(QAbstractSocket::KeepAliveOption, true); + _peer = new LegacyPeer(this, socket(), this); connect(_peer, SIGNAL(transferProgress(int,int)), SIGNAL(transferProgress(int,int))); diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index 87f1484a..206b0194 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -439,6 +439,8 @@ void CoreNetwork::socketInitialized() return; #endif + socket.setSocketOption(QAbstractSocket::KeepAliveOption, true); + CoreIdentity *identity = identityPtr(); if (!identity) { qCritical() << "Identity invalid!";