Skip to content

Commit

Permalink
Merge 4e41f65 into 52762dc
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Nov 30, 2019
2 parents 52762dc + 4e41f65 commit 087a0c1
Show file tree
Hide file tree
Showing 22 changed files with 2,392 additions and 1,758 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -41,6 +41,8 @@ More extensive code examples reside in the [`examples`](./examples) directory.

`amphp/http-client` follows the [semver](http://semver.org/) semantic versioning specification like all other `amphp` packages.

Everything in an `Internal` namespace or marked as `@internal` is not public API and therefore not covered by BC guarantees.

##### 4.x

Under development.
Expand Down
8 changes: 4 additions & 4 deletions composer.json
@@ -1,12 +1,12 @@
{
"name": "amphp/http-client",
"homepage": "https://github.com/amphp/http-client",
"description": "Asynchronous parallel HTTP/2 and HTTP/1.1 client built on the Amp concurrency framework",
"description": "Asynchronous concurrent HTTP/2 and HTTP/1.1 client built on the Amp concurrency framework",
"keywords": [
"http",
"rest",
"client",
"parallel",
"concurrent",
"async",
"non-blocking"
],
Expand All @@ -30,7 +30,7 @@
"amphp/amp": "^2.4",
"amphp/byte-stream": "^1.6",
"amphp/hpack": "^2",
"amphp/http": "^1.3",
"amphp/http": "^1.5",
"amphp/socket": "^1",
"amphp/sync": "^1.3",
"league/uri": "^6",
Expand All @@ -47,7 +47,7 @@
"suggest": {
"ext-zlib": "*",
"ext-json": "*",
"amphp/file": "Required for file request bodies"
"amphp/file": "Required for file request bodies and HTTP archive logging"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Connection/Http1Connection.php
Expand Up @@ -448,9 +448,9 @@ private function handleUpgradeResponse(Request $request, Response $response, str
$socket = new UpgradedSocket($this->socket, $buffer);
$this->free(); // Mark this connection as unusable without closing socket.

asyncCall(function () use ($onUpgrade, $socket, $request, $response): \Generator {
asyncCall(static function () use ($onUpgrade, $socket, $request, $response): \Generator {
try {
yield call($onUpgrade, $socket, clone $request, $response);
yield call($onUpgrade, $socket, $request, $response);
} catch (\Throwable $exception) {
throw new HttpException('Upgrade handler threw an exception', 0, $exception);
} finally {
Expand Down

0 comments on commit 087a0c1

Please sign in to comment.