This centralises the handling of Weak->Arc upgrades when sending, and avoids a footgun where the sender could keep the RequestQueue alive while waiting for a request to complete.
The existing code made this exact mistake: upgrading Weak->Arc, sending a request, and then waiting on the response while the upgraded Arc remained in scope. The sender must drop the Arc after queuing the request and before waiting on the response to avoid the situation where the request is successfully queued while the server is shutting down - resulting in the queued Requests never being dropped and the sender becoming deadlocked.
This centralises the handling of Weak->Arc upgrades when sending, and avoids a footgun where the sender could keep the RequestQueue alive while waiting for a request to complete.
The existing code made this exact mistake: upgrading Weak->Arc, sending a request, and then waiting on the response while the upgraded Arc remained in scope. The sender must drop the Arc after queuing the request and before waiting on the response to avoid the situation where the request is successfully queued while the server is shutting down - resulting in the queued Requests never being dropped and the sender becoming deadlocked.