Close a dead passive during reconnect, freeing up resources. - #25
Conversation
|
Claude finished @scottf's task in 2m 0s —— View job PR Review
SummaryThe fix is correct and addresses a real resource leak. When both servers are down (whole-cluster path), the old code did The fix properly captures the reference, nulls the field first (re-entrancy guard), then closes. ObservationsCorrectness — The null-before-close ordering is correct. Nulling Synchronous close on the reconnect thread — Test design — The test is well-structured. Using One minor note: if the passive happens to be in No issues found. The fix is minimal, targeted, and the test directly exercises the bug path. |
|
Good call to flag the assumption rather than take it on faith — I traced it through the current jnats source and it holds. And the test already lands in exactly the state you described: it kills the passive's server first (passive drops into RECONNECTING), then the active's, so |
Addresses #24