Skip to content

Commit

Permalink
Note inactivity timeout in exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Apr 13, 2020
1 parent d133f52 commit 24bdb69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Connection/Http1Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ private function readResponse(
);
} catch (PromiseTimeoutException $e) {
$this->close();
throw new TimeoutException('Inactivity timeout exceeded, took longer than ' . $timeout . ' ms', 0, $e);
throw new TimeoutException('Inactivity timeout exceeded, more than ' . $timeout . ' ms elapsed from last data received', 0, $e);
}

$originalCancellation->throwIfRequested();
Expand Down Expand Up @@ -461,7 +461,7 @@ private function readResponse(
throw $e;
} catch (PromiseTimeoutException $e) {
$this->close();
throw new TimeoutException('Receiving the response timed out due to inactivity', 0, $e);
throw new TimeoutException('Inactivity timeout exceeded, more than ' . $timeout . ' ms elapsed from last data received', 0, $e);
} catch (\Throwable $e) {
$this->close();
throw new SocketException('Receiving the response headers failed: ' . $e->getMessage(), 0, $e);
Expand Down

0 comments on commit 24bdb69

Please sign in to comment.