(basePath: string, maxTries = 100)
| 96 | } |
| 97 | |
| 98 | public async findFreeSocketPath(basePath: string, maxTries = 100): Promise<string> { |
| 99 | let i = 0 |
| 100 | let path = basePath |
| 101 | while ((await canConnect(path)) && i < maxTries) { |
| 102 | path = `${basePath}-${++i}` |
| 103 | } |
| 104 | return path |
| 105 | } |
| 106 | } |
no test coverage detected