Skip to content

Comments

Fix issue with receiving loop getting stuck#366

Merged
gferon merged 9 commits intomainfrom
fix-ws-receive-blocking
Feb 18, 2026
Merged

Fix issue with receiving loop getting stuck#366
gferon merged 9 commits intomainfrom
fix-ws-receive-blocking

Conversation

@gferon
Copy link
Collaborator

@gferon gferon commented Feb 16, 2026

#363 attempted to make things better but actually ended up making it worse.

The polling logic I introduced in #343 using was wrong in all cases.

The real issue was two-fold:

  • The identified websocket was being initialised (or reused) for the AccountManager instance we prepare, and then re-initialised by the message receiving loop, which requires a fresh websocket to make sure we start the sync from the start (and then receiving EmptyQueue). I should investigate why this doesn't blow in your face with a nice error message - it hangs instead. Re-ordering and reusing variables correctly
  • The way we were polling on the refresh registration task was absolutely not correct, because it would essentially be dropped once we receive the first element of the decrypted messages stream.

@gferon gferon changed the title Fix ws receive blocking Fix issue with receiving loop getting stuck Feb 18, 2026
@gferon gferon marked this pull request as ready for review February 18, 2026 13:51
@gferon gferon enabled auto-merge (squash) February 18, 2026 14:09
@gferon gferon merged commit 1a474ca into main Feb 18, 2026
3 checks passed
@gferon gferon deleted the fix-ws-receive-blocking branch February 18, 2026 14:10
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.

1 participant