(conn: string)
| 623 | } |
| 624 | |
| 625 | function makeDefaultConnStatus(conn: string): ConnStatus { |
| 626 | if (isLocalConnName(conn)) { |
| 627 | return { |
| 628 | connection: conn, |
| 629 | connected: true, |
| 630 | error: null, |
| 631 | status: "connected", |
| 632 | hasconnected: true, |
| 633 | activeconnnum: 0, |
| 634 | wshenabled: false, |
| 635 | }; |
| 636 | } |
| 637 | return { |
| 638 | connection: conn, |
| 639 | connected: false, |
| 640 | error: null, |
| 641 | status: "disconnected", |
| 642 | hasconnected: false, |
| 643 | activeconnnum: 0, |
| 644 | wshenabled: false, |
| 645 | }; |
| 646 | } |
| 647 | |
| 648 | function getConnStatusAtom(conn: string): PrimitiveAtom<ConnStatus> { |
| 649 | const connStatusMap = globalStore.get(ConnStatusMapAtom); |
no test coverage detected