(reason: unknown)
| 288 | } |
| 289 | |
| 290 | function onCancel(reason: unknown) { |
| 291 | if (completed) return |
| 292 | completed = true |
| 293 | cleanup() |
| 294 | terminateSocket() |
| 295 | options.onAbort?.(cancelError(reason)) |
| 296 | } |
| 297 | |
| 298 | function attach(next: WebSocket) { |
| 299 | cleanupSocket() |
no test coverage detected