Skip to content

Commit b9d8a14

Browse files
atlowCheminodejs-github-bot
authored andcommitted
http2: use internal addAbortListener
PR-URL: #52081 Refs: #48596 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent ff93f3e commit b9d8a14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/http2/core.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ assertCrypto();
4646

4747
const assert = require('assert');
4848
const EventEmitter = require('events');
49+
const { addAbortListener } = require('internal/events/abort_listener');
4950
const fs = require('fs');
5051
const http = require('http');
5152
const { readUInt16BE, readUInt32BE } = require('internal/buffer');
@@ -1832,7 +1833,7 @@ class ClientHttp2Session extends Http2Session {
18321833
if (signal.aborted) {
18331834
aborter();
18341835
} else {
1835-
const disposable = EventEmitter.addAbortListener(signal, aborter);
1836+
const disposable = addAbortListener(signal, aborter);
18361837
stream.once('close', disposable[SymbolDispose]);
18371838
}
18381839
}

0 commit comments

Comments
 (0)