RocketChat / RocketChat/Rocket.Chat.js.SDK
Coordinate the complete ordinary Connection-attempt lifecycle
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 99
- Avg merge
- 7h 59m
- Merged PRs (30d)
- 17
Description
Parent
#412
What to build
Give each Socket one authoritative ordinary Connection attempt from Transport construction through the DDP handshake. Concurrent Driver connect() callers share it, an already usable Transport is retained, and every caller receives the outcome of that same attempt.
Acceptance criteria
- Concurrent ordinary connection requests construct and attach at most one observable Transport and fulfill only after the DDP handshake succeeds.
- A usable established Transport is retained without creating a new attempt.
- One absolute Deadline spans Transport construction and the DDP handshake; joining callers inherit its remaining time.
- All callers attached to an attempt observe the same terminal kind and timing, without requiring Promise or Error reference identity.
- Construction and write failures preserve useful
Errorreasons; reasonless or non-Error Transport failures use[ddp] transport failed during the connection attempt. - Deadline expiry uses
[ddp] connection attempt did not complete before the deadline. - An ordinary one-shot failure schedules no Reopen, and authoritative success leaves the Socket Idle while retaining the established Transport.
- Stale or duplicate callbacks cannot change ownership, emit lifecycle events, or schedule recovery.
-
connectingoccurs once after successful Transport attachment; Socketopenand Driverconnectedoccur once after handshake success. - The relevant Driver and Socket tests use normal production construction with the mocked Transport registry.
Blocked by
None (can start immediately).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with parent issue #412 and trace the Driver and Socket connection paths through the mocked Transport registry. Use the listed acceptance criteria as the completion checklist, especially shared deadlines, callback ownership, lifecycle events, failure reasons, and the relevant Driver and Socket tests using normal production construction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100