@graphql-tools/executor-http 3.4.0 → 3.4.1-alpha-bdaf58055541ac4be711541d8853b1da29c55f59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @graphql-tools/executor-http
2
2
 
3
+ ## 3.4.1-alpha-bdaf58055541ac4be711541d8853b1da29c55f59
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [#2485](https://github.com/graphql-hive/gateway/pull/2485) [`47fe3d6`](https://github.com/graphql-hive/gateway/commit/47fe3d6846f3c6227985168cac6bb2d5f1db91cc) Thanks [@adam-drag](https://github.com/adam-drag)! - Release the connection when an SSE subscription is torn down
9
+
10
+ `handleEventStreamResponse` called `reader.releaseLock()` on normal teardown,
11
+ which detaches the reader but leaves the response body un-cancelled, so the
12
+ underlying HTTP connection was never released and the socket stayed open until
13
+ the process exited. Long-running consumers accumulated one leaked connection per
14
+ disposed subscription.
15
+
16
+ It now calls `reader.cancel()`, which propagates cancellation and closes the
17
+ connection. The error path already used `cancel()`; only the normal path did not.
18
+
19
+ Closes https://github.com/graphql-hive/gateway/issues/2486
20
+
3
21
  ## 3.4.0
4
22
  ### Minor Changes
5
23
 
package/dist/index.cjs CHANGED
@@ -409,7 +409,8 @@ function handleEventStreamResponse(response, subscriptionCtrl, signal) {
409
409
  stop.then(() => {
410
410
  subscriptionCtrl?.abort();
411
411
  if (body.locked) {
412
- reader.releaseLock();
412
+ reader.cancel().catch(() => {
413
+ });
413
414
  }
414
415
  }).catch((err) => {
415
416
  reader.cancel(err);
package/dist/index.js CHANGED
@@ -407,7 +407,8 @@ function handleEventStreamResponse(response, subscriptionCtrl, signal) {
407
407
  stop.then(() => {
408
408
  subscriptionCtrl?.abort();
409
409
  if (body.locked) {
410
- reader.releaseLock();
410
+ reader.cancel().catch(() => {
411
+ });
411
412
  }
412
413
  }).catch((err) => {
413
414
  reader.cancel(err);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/executor-http",
3
- "version": "3.4.0",
3
+ "version": "3.4.1-alpha-bdaf58055541ac4be711541d8853b1da29c55f59",
4
4
  "type": "module",
5
5
  "description": "A set of utils for faster development of GraphQL tools",
6
6
  "repository": {