(currentNode: string)
| 179 | }; |
| 180 | |
| 181 | const connect = (currentNode: string) => { |
| 182 | if (disconnectTimer) { |
| 183 | clearTimeout(disconnectTimer); |
| 184 | disconnectTimer = null; |
| 185 | } |
| 186 | |
| 187 | connectionRefCount++; |
| 188 | |
| 189 | if (!websocket && !isConnecting.value) { |
| 190 | initWebSocket(currentNode); |
| 191 | } |
| 192 | }; |
| 193 | |
| 194 | const disconnect = () => { |
| 195 | connectionRefCount = Math.max(0, connectionRefCount - 1); |
no test coverage detected