From 004ee6dbfdbb1af0401af085fdc11991b18e4c8f Mon Sep 17 00:00:00 2001 From: claude-timemachine Date: Mon, 8 Jun 2026 18:24:32 +0200 Subject: [PATCH] automc: drop waker gate on backend-down predefined status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the predefined "asleep" MOTD response on backend-dial-failure was only served when the route had a waker registered. For static fleets (no auto-scale) the gate left clients with a silently-closed TCP socket on status-pings whenever the backend was down — they couldn't tell whether the route was wrong, the host was offline, or the proxy was down. Drop the `waker != nil` gate so any known route's dial-failure on NextState=Status falls back to the configured asleep/loading MOTD. The existing per-route override + global AUTO_SCALE_ASLEEP_MOTD chain handles the actual text. Login attempts still close silently as before — only status pings get the fallback. Co-Authored-By: Claude Opus 4.7 --- server/connector.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/connector.go b/server/connector.go index 63f462c..767a7fe 100644 --- a/server/connector.go +++ b/server/connector.go @@ -659,12 +659,18 @@ func (c *Connector) findAndConnectBackend(frontendConn net.Conn, } } - if waker != nil && nextState == mcproto.StateStatus { + if nextState == mcproto.StateStatus { + // Previously gated on `waker != nil` so only auto-scale routes + // got a predefined response. For static fleets (no waker) clients + // just saw a closed connection on backend-down. Now any known + // route whose backend dial fails returns the configured asleep/ + // loading MOTD — falls back to the global AUTO_SCALE_ASLEEP_MOTD + // when no per-route override is set. logrus.WithFields(logrus.Fields{ "client": clientAddr, "server": serverAddress, "isLegacy": isLegacy, - }).Debug("Scalable backend unreachable: serving predefined status response") + }).Debug("Backend unreachable: serving predefined status response") br := bufio.NewReader(frontendConn) if isLegacy {