Skip to content

Commit be3875f

Browse files
committed
Set lcReady when warmup completes
guides/routing.md documents the post-warmup state as lcReady|lcActive but tryWarmupSkip's completion path only cleared lcNeedsWarmup, leaving lcReady unset for the lifetime of the connection. Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent 34c5832 commit be3875f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

opensearchtransport/connection_warmup.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ func (c *Connection) tryWarmupSkip() warmupResult {
173173
newRounds := rdMgr.rounds() - 1
174174

175175
if newRounds <= 0 {
176-
// Warmup complete -- clear managers and lcNeedsWarmup.
177-
lc := current.lifecycle() &^ lcNeedsWarmup
176+
// Warmup complete -- clear lcNeedsWarmup, set lcReady.
177+
lc := (current.lifecycle() &^ lcNeedsWarmup) | lcReady
178178
if c.state.CompareAndSwap(raw, int64(newConnState(lc))) {
179179
if dl := loadDebugLogger(); dl != nil {
180180
dl.Logf("tryWarmupSkip: COMPLETE %s (warmup done)\n", c.URL)

0 commit comments

Comments
 (0)