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 700a0bb + 0f49445 commit 73f37caCopy full SHA for 73f37ca
src/connection/StreamSocket.php
@@ -98,6 +98,10 @@ public function write(string $buffer)
98
public function read(int $length = 2048): string
99
{
100
$res = stream_get_contents($this->stream, $length);
101
+
102
+ if (stream_get_meta_data($this->stream)["timed_out"])
103
+ throw new ConnectException('Connection timeout reached after '.$this->timeout.' seconds.');
104
105
if (empty($res))
106
throw new ConnectException('Read error');
107
0 commit comments