()
| 41 | } |
| 42 | |
| 43 | close() { |
| 44 | class="cm">// Mark intentional so destroying the in-flight request/response below |
| 45 | class="cm">// doesn't surface its abort as an onerror. Destroying the request also |
| 46 | class="cm">// frees a pending socket when close() runs before the response arrives. |
| 47 | this.closed = true; |
| 48 | this.request.destroy(); |
| 49 | if (this.response) this.response.destroy(); |
| 50 | } |
| 51 | |
| 52 | class="cm">// eslint-disable-next-line accessor-pairs |
| 53 | set onopen(/** @type {unknown} */ value) { |