diff --git a/Client.cpp b/Client.cpp index 25bbf7b7..f5401f4f 100644 --- a/Client.cpp +++ b/Client.cpp @@ -679,7 +679,7 @@ void CClient::LoginTimeout() { void CClient::Connected() { DEBUG_ONLY(cout << GetSockName() << " == Connected();" << endl); - SetTimeout(900); // Now that we are connected, let nature take its course + SetTimeout(240, TMO_READ); // Now that we are connected, let nature take its course } void CClient::ConnectionRefused() { @@ -687,6 +687,7 @@ void CClient::ConnectionRefused() { } void CClient::Disconnected() { + DEBUG_ONLY(cout << GetSockName() << " == Disconnected()" << endl); if (m_pUser) { m_pUser->UserDisconnected(this); } diff --git a/IRCSock.cpp b/IRCSock.cpp index 6d64c942..03d70f10 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -102,7 +102,7 @@ void CIRCSock::ReadLine(const CString& sData) { switch (uRaw) { case 1: {// :irc.server.com 001 nick :Welcome to the Internet Relay Network nick m_pUser->SetIRCServer(sServer); - SetTimeout(900); // Now that we are connected, let nature take its course + SetTimeout(240, TMO_READ); // Now that we are connected, let nature take its course PutIRC("WHO " + sNick); m_bAuthed = true; diff --git a/Timers.h b/Timers.h index 2f2e445d..fa65c8ef 100644 --- a/Timers.h +++ b/Timers.h @@ -28,14 +28,14 @@ protected: vector& vClients = m_pUser->GetClients(); CIRCSock* pIRCSock = m_pUser->GetIRCSock(); - if (pIRCSock && pIRCSock->GetTimeSinceLastDataTransaction() >= 270) { + if (pIRCSock && pIRCSock->GetTimeSinceLastDataTransaction() >= 180) { pIRCSock->PutIRC("PING :ZNC"); } for (size_t a = 0; a < vClients.size(); a++) { CClient* pClient = vClients[a]; - if (pClient->GetTimeSinceLastDataTransaction() >= 470) { + if (pClient->GetTimeSinceLastDataTransaction() >= 180) { pClient->PutClient("PING :ZNC"); } }