mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
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:
+2
-1
@@ -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
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user