Refuse realtime work while close owns the Socket

Open
#418 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api, networking

Research direction

Read parent issue #412 and blocker #417 first, then trace the Socket and Transport entry points for DDP, Login, Logout, subscription, and Liveness work. Add or extend tests for waiting, queued, already-written, cancellation, settlement, and late-callback cases; done means all listed acceptance criteria pass without obsolete disconnected lifecycle handling.

Written by the indexing model from the issue text.

Description

ready-for-agent

Parent

#412

What to build

Prevent new DDP, Login, Logout, subscription, and Liveness work from reaching a Transport while close owns the Socket, while preserving the established outcomes of work that was already written.

Acceptance criteria

  • New DDP work during close rejects with [ddp] connection closed before the response arrived and writes no message.
  • Work waiting to write, queued work, and already-written work settle according to the ownership decision in #412.
  • Liveness work cannot reach the Transport while close owns the Socket.
  • Login and Logout requested during close reject before changing Login state, request queues, or DDP subscriptions.
  • Existing DDP subscription bookkeeping remains correct across close cancellation and direct wait settlement.
  • The obsolete Socket disconnected event no longer drives settlement or appears as a lifecycle event.
  • Stream-data listeners continue to observe the retained connecting, close, and connected events.
  • Tests cover waiting-to-write, queued, already-written, Liveness, Login, Logout, subscription, and late-callback cases.

Blocked by

  • #417
Dominant language
TypeScript
Stars
146
Forks
101
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/Rocket.Chat.js.SDK

All issues in RocketChat/Rocket.Chat.js.SDK

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.