(error: Error)
| 443 | ) |
| 444 | } |
| 445 | const onError = (error: Error) => { |
| 446 | cleanup() |
| 447 | reject( |
| 448 | new Error( |
| 449 | `remote app server at ${this.args.websocketUrl} transport failed during initialize: ${error.message}`, |
| 450 | ), |
| 451 | ) |
| 452 | } |
| 453 | const cleanup = () => { |
| 454 | ws.off('message', onMessage) |
| 455 | ws.off('close', onClose) |