Introduce error checking when calling handleEvents
This commit is contained in:
parent
2fe1b12804
commit
9b9a36e492
@ -72,7 +72,11 @@ class IrcManager extends ImManager {
|
||||
*/
|
||||
public function idle() {
|
||||
// Call Phergie's doTick methods if necessary
|
||||
$this->conn->handleEvents();
|
||||
try {
|
||||
$this->conn->handleEvents();
|
||||
} catch (Phergie_Driver_Exception $e) {
|
||||
$this->conn->reconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -84,7 +88,12 @@ class IrcManager extends ImManager {
|
||||
public function handleInput($socket) {
|
||||
common_log(LOG_DEBUG, 'Servicing the IRC queue.');
|
||||
$this->stats('irc_process');
|
||||
$this->conn->handleEvents();
|
||||
|
||||
try {
|
||||
$this->conn->handleEvents();
|
||||
} catch (Phergie_Driver_Exception $e) {
|
||||
$this->conn->reconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user