Skip to content

Commit

Permalink
Merge pull request BenMenking#62 from IgorAlov/master
Browse files Browse the repository at this point in the history
fix: socket timeout check
  • Loading branch information
BenMenking authored Oct 10, 2023
2 parents 2ada715 + 309ee90 commit 76407b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routeros_api.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public function read($parse = true)
$this->debug('>>> [' . $LENGTH . ', ' . $STATUS['unread_bytes'] . ']' . $_);
}

if ((!$this->connected && !$STATUS['unread_bytes']) || ($this->connected && !$STATUS['unread_bytes'] && $receiveddone)) {
if ((!$this->connected && !$STATUS['unread_bytes']) || ($this->connected && !$STATUS['unread_bytes'] && $receiveddone) || $STATUS['timed_out']) {
break;
}
}
Expand Down

0 comments on commit 76407b1

Please sign in to comment.