mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add a few breaks to avoid connection flooding for the irc-bot (#14479)
* Add a few breaks to avoid connection flooding Adding a few sleep()s in the connection loop to avoid connection flooding on errors. * Add lost bracket * Add linebreaks to please StyleCi * More Ci
This commit is contained in:
@ -158,7 +158,11 @@ class IRCBot
|
|||||||
private function init()
|
private function init()
|
||||||
{
|
{
|
||||||
if ($this->config['irc_alert']) {
|
if ($this->config['irc_alert']) {
|
||||||
$this->connectAlert();
|
if (! $this->connectAlert()) {
|
||||||
|
sleep(5);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->last_activity = time();
|
$this->last_activity = time();
|
||||||
@ -205,6 +209,7 @@ class IRCBot
|
|||||||
|
|
||||||
usleep($this->tick);
|
usleep($this->tick);
|
||||||
}
|
}
|
||||||
|
sleep(10);
|
||||||
|
|
||||||
return $this->init();
|
return $this->init();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user