set SO_KEEPALIVE on client sockets
[quassel.git] / src / client / clientauthhandler.cpp
index 4317453..8fc2a73 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   Copyright (C) 2005-2014 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -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)));