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

refactor(WebSocketShard): error event handling #10436

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Conversation

didinele
Copy link
Member

@didinele didinele commented Aug 8, 2024

Please describe the changes this PR makes and why it should be merged:
Fixes #10397

Internal ref: https://discord.com/channels/222078108977594368/999796393810067607/1271166923500945419

@didinele didinele requested a review from a team as a code owner August 8, 2024 13:25
Copy link

vercel bot commented Aug 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Aug 15, 2024 4:07pm
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Aug 15, 2024 4:07pm

Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.80%. Comparing base (432e9b8) to head (be331e3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10436      +/-   ##
==========================================
+ Coverage   50.79%   50.80%   +0.01%     
==========================================
  Files         228      228              
  Lines       20689    20679      -10     
  Branches     1258     1258              
==========================================
- Hits        10508    10505       -3     
+ Misses      10137    10130       -7     
  Partials       44       44              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.connection.onmessage = null;
and the like probably won't remove those listeners then anymore

packages/ws/src/ws/WebSocketShard.ts Outdated Show resolved Hide resolved
SpaceEEC
SpaceEEC previously approved these changes Aug 8, 2024
@didinele didinele changed the title fix(WebSocketShard): retry on 5xx error refactor(WebSocketShard): error event handling Aug 8, 2024
@didinele didinele marked this pull request as draft August 8, 2024 18:45
@didinele didinele added this to the ws 2.0.0 milestone Aug 8, 2024
@didinele didinele dismissed stale reviews from vladfrangu and SpaceEEC August 8, 2024 18:51

no longer relevant

@didinele didinele marked this pull request as ready for review August 8, 2024 18:51
@kodiakhq kodiakhq bot merged commit a6de270 into main Aug 15, 2024
8 checks passed
@kodiakhq kodiakhq bot deleted the fix/ws-retry-5xx branch August 15, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Client being destroyed before ready event when shard receives unexpected response 520
4 participants