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

Fix connection getting flushed during exception handling #60

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

Thom747
Copy link
Contributor

@Thom747 Thom747 commented Oct 5, 2023

Currently, when a connection's __exit__ method is called due to an exception, the connection first flushes all its pending instructions in a blocking manner.
In practice, this means that exceptions are delayed until whatever is on the other end of the exception has completed its subroutine and returns the results.
Depending on whatever is on the other end of the connection, this could take up to an infinite amount of time.

This PR fixes this behaviour by adding a flag to the close method that makes it skip flushing during exception handling.

@Thom747 Thom747 force-pushed the dont-flush-on-exception branch from d1ec609 to e5ed021 Compare October 6, 2023 12:56
@bvdvecht bvdvecht merged commit 98da62c into QuTech-Delft:develop Oct 10, 2023
6 checks passed
@Thom747 Thom747 deleted the dont-flush-on-exception branch March 5, 2024 09:39
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.

2 participants