Skip to content

Commit ff3f66e

Browse files
authored
Merge pull request #7 from jpswade/bug/17484
Fix for "Maximum execution time of 30 seconds exceeded" error
2 parents d763c16 + b38903e commit ff3f66e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Net/Socket.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,9 @@ public function readAll()
617617
}
618618

619619
$data = '';
620-
while (!feof($this->fp)) {
620+
$timeout = time() + $this->timeout;
621+
622+
while (!feof($this->fp) && (!$this->timeout || time() < $timeout)) {
621623
$data .= @fread($this->fp, $this->lineLength);
622624
}
623625

@@ -704,4 +706,4 @@ public function enableCrypto($enabled, $type)
704706
}
705707
}
706708

707-
}
709+
}

0 commit comments

Comments
 (0)