-
Notifications
You must be signed in to change notification settings - Fork 42
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
Remove unnecessary tokio::spawn #2407
Conversation
97fb04d
to
d96032f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works! It might even have fixed the "closure invoked recursively or after being dropped" problem with libp2p's websocket-websys transport 😲
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
tokio::spawn
seems unnecessary or superfluous (at least) according to the logic around it.
It doesn't seem entirely superfluous, it makes sure that each request cannot block the rest of the requests. If that's still wanted, then this change is incorrect.
8fe2a69
to
220d10b
Compare
- Unnecessary tokio spawn - This is not compatible with web clients (WASM)
220d10b
to
41a666c
Compare
We will address this in a separate issue (#2434). |
This could explain the failure mentioned in #2404
Before this change regular nodes didn't try to connect to web clients, because they were filtered: web clients do not provide any service to regular nodes. This can be observed in this code.
This means that before, web clients were not responding to any of the consensus handlers.
However, after the handle incompatible peers commit, regular nodes can now perform head requests to web clients, which causes web clients to execute a
tokio::spawn
, which is not allowed (a special task executor is necessary in web environments).This
tokio::spawn
seems unnecessary or superfluous (at least) according to the logic around it.This fixes #2404 .
Pull request checklist
clippy
andrustfmt
warnings.