()
| 95 | |
| 96 | const disposeRuntimeConnection = runtime.connect(connection) |
| 97 | const disposeOnce = () => { |
| 98 | if (disposed) return |
| 99 | disposed = true |
| 100 | clearInterval(heartbeat) |
| 101 | disposeRuntimeConnection() |
| 102 | } |
| 103 | |
| 104 | heartbeat = setInterval(() => { |
| 105 | if (socket.readyState !== WebSocket.OPEN) { |