Skip to content

Commit

Permalink
Update Connection.php
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Nov 15, 2024
1 parent 8bab0ae commit d0da01b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/mako/redis/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,16 @@ protected function createConnection(string $host, int $port)
*/
protected function appendReadErrorReason($message): string
{
if (stream_get_meta_data($this->connection)['timed_out']) {
$metadata = stream_get_meta_data($this->connection);

if ($metadata['timed_out']) {
return "{$message} The stream timed out while waiting for data.";
}

if ($metadata['blocked']) {
return "{$message} The stream is in blocking I/O mode.";
}

return $message;
}

Expand Down

0 comments on commit d0da01b

Please sign in to comment.