We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbe6a12 commit b38903eCopy full SHA for b38903e
1 file changed
Net/Socket.php
@@ -601,7 +601,9 @@ function readAll()
601
}
602
603
$data = '';
604
- while (!feof($this->fp)) {
+ $timeout = time() + $this->timeout;
605
+
606
+ while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
607
$data .= @fread($this->fp, $this->lineLength);
608
609
return $data;
@@ -683,4 +685,4 @@ function enableCrypto($enabled, $type)
683
685
684
686
687
-}
688
+}
0 commit comments