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 PubSub client creation/pending topic resolving #3037

Merged
merged 7 commits into from Jul 25, 2021

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented Jul 18, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

We had two issues that combined into one:

  1. PubSub clients were created on masse on startup, the first 2 clients that are created were filled and then many more listens were requested, creating one client request each. We now handle this crudely with an atomic bool we check upon client creation request, and set when the connection is open.
  2. Whenever a client is connected and we go through the topic listen request queue, we also check if the listen queue is empty. If it's not, we request a new client to be created.

Fixes #3014

@pajlada pajlada requested a review from zneix July 18, 2021 10:39
Create new client if pending topics wasn't cleared out by a new client connecting

Add DebugCount for some PubSub data
@pajlada pajlada force-pushed the fix/pubsub-not-resolving-all-pending-listens branch from 1b26932 to a3eb108 Compare July 18, 2021 10:42
@pajlada pajlada marked this pull request as ready for review July 18, 2021 10:42
CHANGELOG.md Outdated Show resolved Hide resolved
zneix and others added 3 commits July 25, 2021 15:57
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
@zneix zneix enabled auto-merge (squash) July 25, 2021 14:38
@zneix zneix merged commit 770b9f2 into master Jul 25, 2021
@zneix zneix deleted the fix/pubsub-not-resolving-all-pending-listens branch July 25, 2021 15:13
zneix added a commit to SevenTV/chatterino7 that referenced this pull request Jul 25, 2021
Now we're on commit 770b9f2; Changes from upstream we pulled:

- Minor: Added informative messages for recent-messages API's errors. (Chatterino#3029)
- Minor: Added section with helpful Chatterino-related links to the About page. (Chatterino#3068)
- Bugfix: Fixed PubSub not properly trying to resolve pending listens when the pending listens list was larger than 50. (Chatterino#3037)
- Bugfix: Copy buttons in usercard now show properly in light mode (Chatterino#3057)
- Bugfix: Fixed comma appended to username completion when not at the beginning of the message. (Chatterino#3060)
- Bugfix: Fixed bug misplacing chat when zooming on Chrome with Chatterino Native Host extension (Chatterino#1936)
- Dev: Disabled update checker on Flatpak. (Chatterino#3051)
- Dev: Add logging for HTTP requests (Chatterino#2991)
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.

PubSub creates only 1 connection, strictly limitting amount of topics Chatterino can listen to
3 participants