Aias00 opened a new pull request, #3440: URL: https://github.com/apache/dubbo-go/pull/3440
## Problem The global `pendingResponses` sync.Map is cleaned up on the success path via `Response.Handle()` → `removePendingResponse()`, but entries were never removed when requests fail. In network failure or timeout scenarios, this map grows indefinitely. ## Leak Points | Location | Trigger | |---|---| | `ExchangeClient.Request()` L134 | `client.Request()` returns error | | `ExchangeClient.AsyncRequest()` L168 | `client.Request()` returns error | | `getty heartbeat()` L356 | heartbeat timeout (`<-gxtime.After(timeout)`) | ## Fix 1. **`remoting/exchange.go`** — Export `RemovePendingResponse()` so external packages (e.g., `getty`) can call it. 2. **`remoting/exchange_client.go`** — Add `removePendingResponse()` calls in `Request()` and `AsyncRequest()` error paths before returning. 3. **`remoting/getty/listener.go`** — Add `remoting.RemovePendingResponse()` call in `heartbeat()` timeout branch to clean up the orphaned entry. ## Testing All `remoting/...` package tests pass. 🤖 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]
