Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dd82b1 commit f3c4300Copy full SHA for f3c4300
lib/dgram.js
@@ -30,6 +30,7 @@ const {
30
ObjectDefineProperty,
31
ObjectSetPrototypeOf,
32
ReflectApply,
33
+ SymbolDispose,
34
} = primordials;
35
36
const errors = require('internal/errors');
@@ -144,8 +145,8 @@ function Socket(type, listener) {
144
145
if (signal.aborted) {
146
onAborted();
147
} else {
- signal.addEventListener('abort', onAborted);
148
- this.once('close', () => signal.removeEventListener('abort', onAborted));
+ const disposable = EventEmitter.addAbortListener(signal, onAborted);
149
+ this.once('close', disposable[SymbolDispose]);
150
}
151
152
if (udpSocketChannel.hasSubscribers) {
0 commit comments