Changed ping timers and timeout settings to use more reasonable values. Also changed timeout type for irc and client sockets.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1297 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
silverleo
2008-12-21 09:03:04 +00:00
parent de3fb7f3dc
commit 110485eaaf
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -28,14 +28,14 @@ protected:
vector<CClient*>& 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");
}
}