codex-relay 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src.js +12 -0
- package/package.json +1 -1
package/dist/src.js
CHANGED
|
@@ -7546,6 +7546,18 @@ serve({
|
|
|
7546
7546
|
port: info.port,
|
|
7547
7547
|
sharedAppServerRemoteAddress: relayAppServer?.appServerMode === "socket" ? resolveCodexSharedAppServerRemoteAddress() : void 0
|
|
7548
7548
|
}));
|
|
7549
|
+
}).on("error", (error) => {
|
|
7550
|
+
if (error.code !== "EADDRINUSE") throw error;
|
|
7551
|
+
console.error(`Codex Relay could not start: ${hostname$1}:${port} is already in use.`);
|
|
7552
|
+
console.error("Another Codex Relay instance or another application may be listening there.");
|
|
7553
|
+
console.error("If it is your existing relay, print its pairing QR with:");
|
|
7554
|
+
console.error(` ${npxCommand} qr`);
|
|
7555
|
+
console.error("To stop a background relay using this data directory:");
|
|
7556
|
+
console.error(` ${npxCommand} stop`);
|
|
7557
|
+
console.error("Otherwise, identify the listener before stopping it:");
|
|
7558
|
+
console.error(` lsof -nP -iTCP:${port} -sTCP:LISTEN`);
|
|
7559
|
+
console.error("To run a separate relay, use a free PORT and a separate CODEX_RELAY_HOME.");
|
|
7560
|
+
stopRelayAppServer(1);
|
|
7549
7561
|
});
|
|
7550
7562
|
function stopRelayAppServer(exitCode) {
|
|
7551
7563
|
relayAppServer?.close();
|