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

Store strong references to websocket publishers #128

Merged
merged 2 commits into from Oct 23, 2021
Merged

Store strong references to websocket publishers #128

merged 2 commits into from Oct 23, 2021

Conversation

Tijani-Dia
Copy link
Collaborator

@Tijani-Dia Tijani-Dia commented Oct 23, 2021

Both @allcaps and I have set up a project using PieSocket publisher.

The publisher works the first times and suddenly stops working.

This is due to the fact that Django store weak references to signal listeners. See here. Since our live publishers aren't referenced elsewhere in the code, they might get garbage collected hence the bug.

This PR fixes that.

Copy link
Member

@allcaps allcaps left a comment

Choose a reason for hiding this comment

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

This works for me! Great.

@allcaps allcaps merged commit a204356 into main Oct 23, 2021
@Tijani-Dia Tijani-Dia deleted the signals branch October 23, 2021 21:47
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