mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix the event socket connected method
It was not detecting the connection to event socket correctly. This change resolve the high cpu usage for event guard.
This commit is contained in:
@@ -142,11 +142,13 @@ class event_socket {
|
||||
}
|
||||
|
||||
public function connected() {
|
||||
if ($this->fp) {
|
||||
return true;
|
||||
if (feof($this->fp) === true) {
|
||||
//not connected to the socket
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
//connected to the socket
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user