| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,6 +30,7 @@ const { | |||
| 30 | 30 | ObjectDefineProperty, | |
| 31 | 31 | ObjectSetPrototypeOf, | |
| 32 | 32 | ReflectApply, | |
| 33 | + SymbolDispose, | ||
| 33 | 34 | } = primordials; | |
| 34 | 35 | ||
| 35 | 36 | const errors = require('internal/errors'); | |
@@ -144,8 +145,8 @@ function Socket(type, listener) { | |||
| 144 | 145 | if (signal.aborted) { | |
| 145 | 146 | onAborted(); | |
| 146 | 147 | } else { | |
| 147 | - signal.addEventListener('abort', onAborted); | ||
| 148 | - this.once('close', () => signal.removeEventListener('abort', onAborted)); | ||
| 148 | + const disposable = EventEmitter.addAbortListener(signal, onAborted); | ||
| 149 | + this.once('close', disposable[SymbolDispose]); | ||
| 149 | 150 | } | |
| 150 | 151 | } | |
| 151 | 152 | if (udpSocketChannel.hasSubscribers) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments