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 8ec8874 + 2ac46aa commit a6384c0Copy full SHA for a6384c0
src/connection/Socket.php
@@ -80,8 +80,11 @@ public function read(int $length = 2048): string
80
if (mb_strlen($output, '8bit') == 0 && $this->timeout > 0 && (microtime(true) - $t) >= $this->timeout)
81
throw new ConnectionTimeoutException('Read from connection reached timeout after ' . $this->timeout . ' seconds.');
82
$readed = @socket_read($this->socket, $length - mb_strlen($output, '8bit'));
83
- if ($readed === false)
+ if ($readed === false) {
84
+ if (socket_last_error($this->socket) === 10004)
85
+ continue;
86
$this->throwConnectException();
87
+ }
88
$output .= $readed;
89
} while (mb_strlen($output, '8bit') < $length);
90
0 commit comments