Problem
Client.reopen() currently replaces the connector and response parser even when a request is still awaiting its response. That silently abandons the active exchange. When reopen is otherwise legal, the connector also retains its receive buffer, allowing bytes accepted from the old socket to enter the fresh parser generation.
Expected behavior
- Raise
RuntimeError when manual reopen would discard an unsettled response generation.
- Leave the active socket, parser, queued request bytes, and waiting state unchanged after rejection.
- On a legal reopen, clear residual old-generation receive bytes before rearming the response parser.
Upstream dependency
This changes a public method contract and is not ready for current main. It depends on #189 and its prerequisite chain through #188 and PRs #183, #185, and #187. The release branch already contains those changes.
Problem
Client.reopen()currently replaces the connector and response parser even when a request is still awaiting its response. That silently abandons the active exchange. When reopen is otherwise legal, the connector also retains its receive buffer, allowing bytes accepted from the old socket to enter the fresh parser generation.Expected behavior
RuntimeErrorwhen manual reopen would discard an unsettled response generation.Upstream dependency
This changes a public method contract and is not ready for current
main. It depends on #189 and its prerequisite chain through #188 and PRs #183, #185, and #187. The release branch already contains those changes.