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".
This commit is contained in:
2026-10-24 22:13:52 +02:00
parent 3c50e80972
commit fad3d7ee71
+4 -1
View File
@@ -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).