Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be88f7c

Browse filesBrowse files
atlowChemiruyadorno
authored andcommitted
http2: use addAbortListener
PR-URL: #48550 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent d9a800e commit be88f7c
Copy full SHA for be88f7c

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Collapse file

‎lib/internal/http2/core.js‎

Copy file name to clipboardExpand all lines: lib/internal/http2/core.js
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const {
2727
SafeSet,
2828
StringPrototypeSlice,
2929
Symbol,
30+
SymbolDispose,
3031
TypedArrayPrototypeGetLength,
3132
Uint32Array,
3233
Uint8Array,
@@ -1810,10 +1811,8 @@ class ClientHttp2Session extends Http2Session {
18101811
if (signal.aborted) {
18111812
aborter();
18121813
} else {
1813-
signal.addEventListener('abort', aborter);
1814-
stream.once('close', () => {
1815-
signal.removeEventListener('abort', aborter);
1816-
});
1814+
const disposable = EventEmitter.addAbortListener(signal, aborter);
1815+
stream.once('close', disposable[SymbolDispose]);
18171816
}
18181817
}
18191818

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.