File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -176,10 +176,11 @@ that the `abortSignal.aborted` attribute is `false` before adding an `'abort'`
176176event listener.
177177
178178Any event listeners attached to the ` AbortSignal ` should use the
179- ` { once: true } ` option (or, if using the ` EventEmitter ` APIs to attach a
180- listener, use the ` once() ` method) to ensure that the event listener is
181- removed as soon as the ` 'abort' ` event is handled. Failure to do so may
182- result in memory leaks.
179+ ` { once: true } ` option (or remove the listener manually) to ensure that the
180+ event listener is removed as soon as the ` 'abort' ` event is handled. Failure
181+ to do so may result in memory leaks. Event listeners should also be removed if
182+ they are no longer needed (for example, if the operation is completed before
183+ the signal is aborted).
183184
184185### ` abortSignal.aborted `
185186
You can’t perform that action at this time.
0 commit comments