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.
1 parent 883311c commit 05d8612Copy full SHA for 05d8612
src/Nats/Connection.php
@@ -413,7 +413,8 @@ private function handleMSG($line)
413
public function wait($quantity = 0)
414
{
415
$count = 0;
416
- while (!feof($this->streamSocket)) {
+ $info = stream_get_meta_data($this->streamSocket);
417
+ while (is_resource($this->streamSocket) && !feof($this->streamSocket) && !$info['timed_out']) {
418
$line = $this->receive();
419
420
if ($line === false) {
@@ -431,6 +432,7 @@ public function wait($quantity = 0)
431
432
return $this;
433
}
434
435
436
437
$this->close();
438
0 commit comments