Skip to content

Commit 766eeaa

Browse files
committed
Add JSDoc and a little extra logging for startProxy
1 parent fa9b76a commit 766eeaa

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

lib/start-proxy-action.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/start-proxy-action.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,15 @@ async function runWrapper() {
220220
}
221221
}
222222

223+
/**
224+
* Starts the proxy process with the binary at `binPath` using `config` on a random
225+
* port (but always starting with 49152).
226+
*
227+
* @param binPath The path to the proxy binary.
228+
* @param config The configuration for the proxy.
229+
* @param logFilePath The path for the proxy log file.
230+
* @param logger The logger to use.
231+
*/
223232
async function startProxy(
224233
binPath: string,
225234
config: ProxyConfig,
@@ -232,6 +241,7 @@ async function startProxy(
232241
let tries = 5;
233242
let subprocessError: Error | undefined = undefined;
234243
while (tries-- > 0 && !subprocess && !subprocessError) {
244+
logger.info(`Attempting to start proxy on ${host}:${port}...`);
235245
subprocess = spawn(
236246
binPath,
237247
["-addr", `${host}:${port}`, "-config", "-", "-logfile", logFilePath],

0 commit comments

Comments
 (0)