Claude Ultracode Fixes

This commit is contained in:
chk
2026-06-08 18:17:53 +02:00
parent 7595bae8a1
commit 10d306b7d4
9 changed files with 46 additions and 14 deletions

View File

@@ -99,11 +99,13 @@ function createApp(options = {}) {
consoleObj.warn(`Startup warning: ${disconnectedSenders.length} sender(s) disconnected at startup.`);
}
setTimeoutFn(() => {
senders.forEach(s => {
if (s.instance?.tSocket) robot.cmdReceivers.push(s.instance);
});
}, 5000);
// Register all senders as command receivers immediately and permanently.
// Each sender's execCommand() guards internally against sending while it is
// disconnected, and resumes automatically once it (re)connects — so there is
// no need to wait for a socket or to re-register after a reconnect. The old
// 5s one-shot registration silently dropped senders that connected later
// (e.g. after EHOSTUNREACH backoff) and never registered WebSocket senders.
senders.forEach(s => robot.cmdReceivers.push(s.instance));
const port = Number(processEnv.PORT) || 2095;
httpsServer.listen(port);