added comments for explanation

This commit is contained in:
fourtf
2018-06-24 12:16:32 +02:00
parent 5673cefd1b
commit 02214c38a6
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -7,6 +7,7 @@ namespace irc {
IrcConnection::IrcConnection(QObject *parent)
: Communi::IrcConnection(parent)
{
// send ping every x seconds
this->pingTimer_.setInterval(5000);
this->pingTimer_.start();
QObject::connect(&this->pingTimer_, &QTimer::timeout, [this] {
@@ -17,6 +18,7 @@ IrcConnection::IrcConnection(QObject *parent)
this->recentlyReceivedMessage_ = false;
});
// reconnect after x seconds without receiving a message
this->reconnectTimer_.setInterval(5000);
this->reconnectTimer_.setSingleShot(true);
QObject::connect(&this->reconnectTimer_, &QTimer::timeout,