automc: drop waker gate on backend-down predefined status
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 <noreply@anthropic.com>
This commit is contained in:
+8
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user