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 Twitch-Specific Filters Not Being Applied #4529

Merged
merged 4 commits into from
Apr 10, 2023

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Apr 9, 2023

Description

#4107 previously tried to fix this issue, but was later reverted (#4111), because having a filter like channel.live in a live channel would "freeze" (deadlock) the app (#4110). This PR fixes this deadlock and applies the fix by #4107.

The deadlock was caused, because the lock-guard in TwitchChannel::setLive was kept alive for too long. Specifically, setLive adds a message which then gets to the filter which tries to access streamStatus_, which is locked in setLive (deadlock).

I prevented this by reducing the critical-section where the guard is kept alive.

I also noticed that TwitchChanne::isLive called access over accessConst which lead me down a shallow rabbit-hole:

Fixes #4112.

@Nerixyz Nerixyz force-pushed the fix/twitch-channel-filters branch from be4466b to 2f471c6 Compare April 9, 2023 22:31
Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this, good fix 👍

@pajlada pajlada enabled auto-merge (squash) April 10, 2023 09:37
@pajlada pajlada merged commit 610394d into Chatterino:master Apr 10, 2023
15 checks passed
@Nerixyz Nerixyz deleted the fix/twitch-channel-filters branch April 10, 2023 10:26
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.

Twitch channel-specific filters do not properly recieve the information they need
2 participants