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

src: Fix up WebSocketShard errors #3722

Merged
merged 4 commits into from Feb 2, 2020

Conversation

vladfrangu
Copy link
Member

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

In theory, this change should fix #3706 and should fix #3641! @xKesvaL, @NotSugden and @BannerBomb, please try this PR (since you guys reported the issue)

For anyone else reading this, if you've encountered any of the listed issues, please install this PR and reply here if it works or not!

How to install?

npm i vladfrangu/discOwOd.js#fix-internal-sharding-again or yarn add vladfrangu/discOwOd.js#fix-internal-sharding-again

Changelog

The only notable thing is that WebSocketShard#destroy now takes an object of options and adds a few more options.

Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

src/client/websocket/WebSocketShard.js Outdated Show resolved Hide resolved
@Deivu
Copy link
Contributor

Deivu commented Jan 21, 2020

Just leaving my feedback on this PR: Been running this for 2 days now and it seems to be stable enough

@xKesvaL
Copy link

xKesvaL commented Jan 21, 2020 via email

If the WS was not connected when the HELLO timeout passes
(CONNECTING, etc), the shard would get stuck
due to never rejecting the WebSocketShard#connect
Promise with the DESTROYED event
@SpaceEEC SpaceEEC merged commit b4e56d3 into discordjs:master Feb 2, 2020
samsamson33 pushed a commit to samsamson33/discord.js that referenced this pull request Feb 27, 2020
* src: Fix up WebSocketShard errors

* typings: Forgot to update

* src: Forgot debug variable

* src: Fix issue Bella found
If the WS was not connected when the HELLO timeout passes
(CONNECTING, etc), the shard would get stuck
due to never rejecting the WebSocketShard#connect
Promise with the DESTROYED event
samsamson33 added a commit to samsamson33/discord.js that referenced this pull request Feb 27, 2020
BannerBomb added a commit to BannerBomb/discord.js that referenced this pull request Feb 8, 2021
I just changed an incorrect key name that was introduced in Pull Request discordjs#3722. When destroying the websocket from the WebSocketShard#_send method it's using `close` as the key name instead of `closeCode`
iCrawl pushed a commit that referenced this pull request Feb 10, 2021
I just changed an incorrect key name that was introduced in Pull Request #3722. When destroying the websocket from the WebSocketShard#_send method it's using `close` as the key name instead of `closeCode`
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.

WebSocket onmessage connection is null crash on WebsocketShard.onOpen
6 participants