We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 14078bc + 05d8612 commit b27ee11Copy full SHA for b27ee11
src/Nats/Connection.php
@@ -410,7 +410,8 @@ private function handleMSG($line)
410
public function wait($quantity = 0)
411
{
412
$count = 0;
413
- while (!feof($this->streamSocket)) {
+ $info = stream_get_meta_data($this->streamSocket);
414
+ while (is_resource($this->streamSocket) && !feof($this->streamSocket) && !$info['timed_out']) {
415
$line = $this->receive();
416
417
if ($line === false) {
@@ -428,6 +429,7 @@ public function wait($quantity = 0)
428
429
return $this;
430
}
431
432
433
434
$this->close();
435
0 commit comments