From fad3d7ee7131945e3fa8eb8c29eea606c4703542 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 24 Oct 2026 22:13:52 +0200 Subject: [PATCH] Let go of the hand-act log's connection when serving ends (issue 1945) A controller served in the test process left it pointing at a closed connection, so the next test's conditions verb failed with "connection closed". --- cmd/mesh-controller/push.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/mesh-controller/push.go b/cmd/mesh-controller/push.go index 4da42308..651765ec 100644 --- a/cmd/mesh-controller/push.go +++ b/cmd/mesh-controller/push.go @@ -225,8 +225,11 @@ func serve(ctx context.Context) (err error) { if !isNATS { return errors.New("the mesh's verbs are served over the bus, and this control plane is not on it") } - // The hand-act log is counted for `status` on this connection rather than a new one a minute. + // The hand-act log is counted for `status` on this connection rather than a new one a minute; no longer serving, the + // connection is closed, and a verb run after in this process dials its own (a served test's leftover failed the + // next test's `conditions` with "connection closed", issue 1945). handActConn = bus.Conn + defer func() { handActConn = nil }() // And everything else this controller does on the bus for a moment (novox/hq issue 327). servingBus.Store(server.JetStream()) // No longer serving: nothing is lent, and dead-letters says it is not read here (novox/hq issue 330).