We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d763c16 + b38903e commit ff3f66eCopy full SHA for ff3f66e
1 file changed
Net/Socket.php
@@ -617,7 +617,9 @@ public function readAll()
617
}
618
619
$data = '';
620
- while (!feof($this->fp)) {
+ $timeout = time() + $this->timeout;
621
+
622
+ while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
623
$data .= @fread($this->fp, $this->lineLength);
624
625
@@ -704,4 +706,4 @@ public function enableCrypto($enabled, $type)
704
706
705
707
708
-}
709
+}
0 commit comments