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

fix(runtime/websocket): respond to ping with pong #8974

Merged
merged 2 commits into from
Jan 5, 2021

Conversation

crowlKats
Copy link
Member

@crowlKats crowlKats commented Jan 3, 2021

Closes #8972

@@ -265,6 +267,13 @@
event.target = this;
this.dispatchEvent(event);

this.#eventLoop();
} else if (message.type === "ping") {
Copy link
Member

Choose a reason for hiding this comment

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

This is ok for a first pass, but I think it makes sense to move this logic to Rust.

Copy link
Member Author

@crowlKats crowlKats Jan 3, 2021

Choose a reason for hiding this comment

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

I do plan a somewhat rewrite of websocket (mostly JS things) together with moving it to its own crate

@elizeuangelo
Copy link

I believe this might be related to issue #8972

@lucacasonato lucacasonato self-requested a review January 5, 2021 02:54
Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @crowlKats

@lucacasonato
Copy link
Member

Actually could we add a test for this?

@lucacasonato
Copy link
Member

Discussed offline with @crowlKats, and tests will be added in a follow up PR (possibly using WPT). Landing this as is.

@lucacasonato lucacasonato merged commit f85cd54 into denoland:master Jan 5, 2021
@crowlKats crowlKats deleted the websocket_respond_to_ping branch January 6, 2021 09:09
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 API dying on Deno but not on Chrome
4 participants