(serverId)
| 22 | } |
| 23 | |
| 24 | function getServerStatus(serverId) { |
| 25 | const activeClients = getActiveClients(); |
| 26 | const client = activeClients.find((c) => c.server?.id === serverId); |
| 27 | if (!client) return "stopped"; |
| 28 | try { |
| 29 | return client.client?.connected !== false ? "active" : "connecting"; |
| 30 | } catch { |
| 31 | return "stopped"; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | function getClientState(serverId) { |
| 36 | const activeClients = getActiveClients(); |
no test coverage detected