(stateDir: string)
| 375 | }; |
| 376 | |
| 377 | function createRemoteSessionName(stateDir: string): string { |
| 378 | for (let attempt = 0; attempt < 8; attempt += 1) { |
| 379 | const candidate = `adc-${crypto.randomBytes(3).toString('hex')}`; |
| 380 | if (!readRemoteConnectionState({ stateDir, session: candidate })) { |
| 381 | return candidate; |
| 382 | } |
| 383 | } |
| 384 | return `adc-${Date.now().toString(36)}-${crypto.randomBytes(2).toString('hex')}`; |
| 385 | } |
| 386 | |
| 387 | function renderDisconnectOutput( |
| 388 | session: string, |
no test coverage detected