Aias00 opened a new pull request, #991:
URL: https://github.com/apache/dubbo-go-pixiu/pull/991

   ## Summary
   
   The `startWG sync.WaitGroup` in `Server` struct had `Add(1)` called in 
`Start()` but **no matching `Done()` call anywhere** in the codebase. This made 
`server.startWG.Wait()` block indefinitely by accident — a misleading construct 
that appeared to coordinate something but was really just an unbalanced 
WaitGroup.
   
   ## Change
   
   - Removed `startWG sync.WaitGroup` field from `Server` struct
   - Removed `s.startWG.Add(1)` from `Server.Start()`
   - Replaced `server.startWG.Wait()` with `select {}` — the Go idiom for 
"block forever"
   - Removed unused `sync` import
   
   ## Why `select {}` is correct
   
   The application shuts down via signal handling in 
`listener_manager.go:gracefulShutdownInit()`, where **every exit path calls 
`os.Exit(0)`**:
   
   | Path | Line |
   |------|------|
   | Timeout during graceful shutdown | L103 |
   | Error from listener `ShutDown()` | L112 |
   | Normal completion after all listeners shut down | L124 |
   
   There is no channel, context, or callback to notify the main goroutine of 
shutdown — the process simply exits. `select {}` is functionally equivalent to 
the old behavior but makes the intent explicit.
   
   No tests are affected; no other code referenced `startWG`.
   
   ---
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to