(headers, key)
| 10906 | } |
| 10907 | const { signal, opaque, responseHeaders } = opts; |
| 10908 | if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { |
| 10909 | throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); |
| 10910 | } |
| 10911 | super("UNDICI_CONNECT"); |
| 10912 | this.opaque = opaque || null; |
| 10913 | this.responseHeaders = responseHeaders || null; |
| 10914 | this.callback = callback; |
| 10915 | this.abort = null; |
| 10916 | addSignal(this, signal); |
| 10917 | } |
| 10918 | onConnect(abort, context) { |
| 10919 | if (this.reason) { |
| 10920 | abort(this.reason); |
| 10921 | return; |
| 10922 | } |
| 10923 | assert(this.callback); |
| 10924 | this.abort = abort; |
no test coverage detected