this.join() in _onconnect() and this.leaveAll() in _cleanup should be asynchronized
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 63.2k
- Forks
- 10.3k
- Avg merge
- 11d 20h
- Merged PRs (30d)
- 2
Description
Is your feature request related to a problem? Please describe.
Some codes in socket.io doesn't await on Promise<void>. E.g. this.join() in _onconnect() and this.leaveAll() in _cleanup
Although the built-in adapter can finish them synchronizedly, but not all the customized adapters can finish them sync. Especially some method in adapter's interface can return Promise<void>
Describe the solution you'd like
A clear and concise description of what you want to happen.
Codes that invoke async method should await to guarantee order.
E.g.
Contributor guide
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 in lib/socket.ts at the _onconnect() and _cleanup() locations linked in the issue, and trace the adapter calls made there. Ensure those asynchronous operations are awaited so their ordering is guaranteed; done means both paths handle Promise implementations correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- backend, networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100