pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/MagicStack/asyncpg/pull/1283

/global-0bd78641c0a1f3e0.css" /> Handle PROTOCOL_CANCELLED (state 3) in _dispatch_result. by mnbbrown · Pull Request #1283 · MagicStack/asyncpg · GitHub
Skip to content

Handle PROTOCOL_CANCELLED (state 3) in _dispatch_result.#1283

Draft
mnbbrown wants to merge 1 commit intoMagicStack:masterfrom
mnbbrown:safe-cancellation
Draft

Handle PROTOCOL_CANCELLED (state 3) in _dispatch_result.#1283
mnbbrown wants to merge 1 commit intoMagicStack:masterfrom
mnbbrown:safe-cancellation

Conversation

@mnbbrown
Copy link
Copy Markdown

@mnbbrown mnbbrown commented Oct 26, 2025

Prior to this patch the state machine did not handle results arriving
after cancellation. This add explicit support for that scenario by
keeping track of the state prior to cancellation
(cancelled_from_state), and using cancelled_from_state when consuming the
results.

The alternative option is just silently dropping the results (similar to
PROTOCOL_TERMINATING).

Would maybe close #490

Prior to this patch the state machine did not handle results arriving
after cancellation. This add explicit support for that scenario by
keeping track of the state prior the cancellation
(cancelled_from_state), and using cancelled_from_state when consuming the
results.

The alternative option is just silently dropping the results (similar to
PROTOCOL_TERMINATING).
@mnbbrown mnbbrown marked this pull request as draft October 26, 2025 11:12
@mnbbrown
Copy link
Copy Markdown
Author

Upon reflection I'm not sure this is the best approach.. it would possibly leave a connection in a state that's unexpected by the client. Needs further thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

connection.close is throwing protocol error

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy