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

Revert "fix(server): return err on WS handshake err (#1288)" #1326

Merged
merged 3 commits into from Mar 20, 2024

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Mar 20, 2024

#1288 never worked and let's revert it.

@niklasad1 niklasad1 requested a review from a team as a code owner March 20, 2024 16:26
server/src/transport/ws.rs Outdated Show resolved Hide resolved
@niklasad1 niklasad1 merged commit 1d5b08f into master Mar 20, 2024
11 checks passed
@niklasad1 niklasad1 deleted the na-revert-low-level-api branch March 20, 2024 16:36
niklasad1 added a commit that referenced this pull request Mar 20, 2024
* Revert "fix(server): return err on WS handshake err (#1288)"

This reverts commit d9c4a5c.

* fix docs

* Update server/src/transport/ws.rs
@@ -448,6 +440,14 @@ where
let rpc_service = rpc_middleware.service(rpc_service);

let fut = async move {
let upgraded = match hyper::upgrade::on(req).await {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup ok, I have no idea why moving this up would break anything offhand!

Copy link
Member Author

@niklasad1 niklasad1 Mar 21, 2024

Choose a reason for hiding this comment

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

I forgot about https://github.com/hyperium/hyper/blob/master/examples/upgrades.rs#L56-#L72 so it adds up :)

Thus, the http request must be answered before the upgrade can make progress but not super obvious based on the documentation. However good to know why it didn't work :P

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.

None yet

2 participants