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: lock the connection during a 'notifies()' call #760

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dvarrazzo
Copy link
Member

With the previous implementation, it was possible to sneak an execute() while the generator is consumed. This gives the false impression that it's possible to use the connection while listening (see #756), which is false for reason better explored in #757.

Therefore, lock the connection while listening to notifications. If someone wants to mix commands with listening on the same connection, they should do it collaboratively with an adequately short notifies() timeout.

With the previous implementation, it was possible to sneak an execute()
while the generator is consumed. This gives the false impression that
it's possible to use the connection while listening (see #756), which is
false for reason better explored in #757.

Therefore, lock the connection while listening to notifications. If
someone wants to mix commands with listening on the same connection,
they should do it collaboratively with an adequately short notifies()
timeout.
@dvarrazzo dvarrazzo added this to the 3.2 milestone May 18, 2024
Copy link
Contributor

@dlax dlax left a comment

Choose a reason for hiding this comment

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

Changes, and the reasoning behind, look good to me.

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

2 participants