Add JSDoc and a little extra logging for startProxy

This commit is contained in:
Michael B. Gale
2026-01-27 13:39:20 +00:00
parent fa9b76ac37
commit 766eeaa42e
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -104271,6 +104271,7 @@ async function startProxy(binPath, config, logFilePath, logger) {
let tries = 5;
let subprocessError = void 0;
while (tries-- > 0 && !subprocess && !subprocessError) {
logger.info(`Attempting to start proxy on ${host}:${port}...`);
subprocess = (0, import_child_process.spawn)(
binPath,
["-addr", `${host}:${port}`, "-config", "-", "-logfile", logFilePath],
+10
View File
@@ -220,6 +220,15 @@ async function runWrapper() {
}
}
/**
* Starts the proxy process with the binary at `binPath` using `config` on a random
* port (but always starting with 49152).
*
* @param binPath The path to the proxy binary.
* @param config The configuration for the proxy.
* @param logFilePath The path for the proxy log file.
* @param logger The logger to use.
*/
async function startProxy(
binPath: string,
config: ProxyConfig,
@@ -232,6 +241,7 @@ async function startProxy(
let tries = 5;
let subprocessError: Error | undefined = undefined;
while (tries-- > 0 && !subprocess && !subprocessError) {
logger.info(`Attempting to start proxy on ${host}:${port}...`);
subprocess = spawn(
binPath,
["-addr", `${host}:${port}`, "-config", "-", "-logfile", logFilePath],