mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +09:00
forwardRequest records a request so that its response can be sent back the way it came, but recorded it before handing the message to the connector. When the connector threw, because the session to the next hop was gone, the record stayed behind for a request that had never left. Routers answer the origin themselves when forwarding throws, so the request was already accounted for. The leftover record then had it answered a second time when the link cleared its pending requests on disconnect, producing a duplicate response and "Received response N without a pending request" at the far end. Remove the record when the forward throws. Doing it here rather than in the routers covers both the host, which catches and responds, and the controller router, which does not. Fixes #650 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>