If no handle return false

Splitting up the condition and return false for each condition works in all tests.
This commit is contained in:
FusionPBX 2022-10-20 16:18:55 -06:00 committed by GitHub
parent b004e8f3ba
commit 88b43cfa14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -142,7 +142,11 @@ class event_socket {
}
public function connected() {
if ($this->fp && feof($this->fp) === true) {
if (!$this->fp) {
//not connected to the socket
return false;
}
if (feof($this->fp) === true) {
//not connected to the socket
return false;
}