Skip to content

Commit

Permalink
http2: use internal addAbortListener
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
atlowChemi authored and marco-ippolito committed May 2, 2024
1 parent 22721fb commit 259365e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ assertCrypto();

const assert = require('assert');
const EventEmitter = require('events');
const { addAbortListener } = require('internal/events/abort_listener');
const fs = require('fs');
const http = require('http');
const { readUInt16BE, readUInt32BE } = require('internal/buffer');
Expand Down Expand Up @@ -1832,7 +1833,7 @@ class ClientHttp2Session extends Http2Session {
if (signal.aborted) {
aborter();
} else {
const disposable = EventEmitter.addAbortListener(signal, aborter);
const disposable = addAbortListener(signal, aborter);
stream.once('close', disposable[SymbolDispose]);
}
}
Expand Down

0 comments on commit 259365e

Please sign in to comment.