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:
FusionPBX
2022-10-04 12:36:27 -06:00
committed by GitHub
parent 0db773e395
commit 4d8496f4ad

View File

@@ -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;
}
}