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

Call Application.post_stop Only if Application.stop was called #4211

Open
wants to merge 1 commit into
base: handle-system-exit
Choose a base branch
from

Conversation

Bibo-Joshi
Copy link
Member

to be merged (and possibly reviewed) after #4157. based this PR on the branch of #4157 since the bug mostly becomes visible after those changes.

closes #4210

@Bibo-Joshi Bibo-Joshi requested a review from clot27 April 17, 2024 13:46
@harshil21 harshil21 changed the base branch from master to handle-system-exit May 20, 2024 02:56
@@ -2441,7 +2440,8 @@ async def callback(*args, **kwargs):
app.run_polling(close_loop=False)

# The important part here is that start(_polling) are *not* called!
assert called_callbacks == ["post_stop", "post_shutdown"]
# post_stop must not be called either, since we never called start()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# post_stop must not be called either, since we never called start()
# post_stop must not be called either, since we never called stop()

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] App.post_stop is called even if App.stop is not called
2 participants