Permalink
Browse files

Don't set ConnectDelay to zero

  • Loading branch information...
1 parent a180028 commit 0952ee82e0066724c844b6e3c61127dfe45a3ae9 @DarthGandalf DarthGandalf committed Apr 26, 2014
Showing with 5 additions and 1 deletion.
  1. +1 −0 src/IRCNetwork.cpp
  2. +4 −1 src/znc.cpp
View
@@ -991,6 +991,7 @@ bool CIRCNetwork::Connect() {
return false;
if (CZNC::Get().GetServerThrottle(pServer->GetName())) {
+ // Can't connect right now, schedule retry later
CZNC::Get().AddNetworkToQueue(this);
return false;
}
View
@@ -2009,6 +2009,10 @@ class CConnectQueueTimer : public CCron {
};
void CZNC::SetConnectDelay(unsigned int i) {
+ if (i < 1) {
+ // Don't hammer server with our failed connects
+ i = 1;
+ }
if (m_uiConnectDelay != i && m_pConnectQueueTimer != NULL) {
m_pConnectQueueTimer->Start(i);
}
@@ -2057,7 +2061,6 @@ void CZNC::AddNetworkToQueue(CIRCNetwork *pNetwork) {
}
}
-
m_lpConnectQueue.push_back(pNetwork);
EnableConnectQueue();
}

0 comments on commit 0952ee8

Please sign in to comment.