Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sink method for lost transports #244

Merged
merged 2 commits into from
Aug 18, 2023
Merged

Conversation

barbibulle
Copy link
Collaborator

This allows calls to be unblocked from waiting for a response when the transport goes away.
The new sink method on_transport_lost is optional for sinks. A source should call it when it is terminated.

@barbibulle barbibulle requested a review from uael August 12, 2023 18:02
@@ -455,6 +454,11 @@ def on_packet(self, packet):
else:
logger.debug('reset not done, ignoring packet from controller')

def on_transport_lost(self):
# Called by the source when the transport has been lost.
if self.pending_response:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emit the 'flush' event?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense. I'll add it.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barbibulle barbibulle merged commit 43e632f into main Aug 18, 2023
11 checks passed
@5678bgu
Copy link

5678bgu commented Aug 25, 2023

__

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.

None yet

3 participants