Comments (4)
Thank you for your debugging work and the elaborate explanation.
I am still confused by one thing. Sorry in case I am missing something. It is rather late in my day.
Once the connection task called on_behaviour_event
on the ConnectionHandler
, it will go ahead and poll
the ConnectionHandler
, given that both is running in a loop
.
rust-libp2p/swarm/src/connection/pool/task.rs
Lines 178 to 186 in 9584ee3
Shouldn't this make the fix in #4961 obsolete?
from rust-libp2p.
Good catch @mxinden! I think you are right and #4961 should indeed not be necessary.
from rust-libp2p.
Yes indeed. I had not succeeded in finding where the Handler::poll
was called and in what context, thanks for that @mxinden. If it is the only place, I also think that the bug can not happen with the current implementation.
As for #4961 not being necessary, indeed, since there does not seem to be a case where the bug could happen, it might not be required to do it. However, we should be careful in the future because, since the contract of the poll
method is broken (a function returning Poll::Pending must also ensure that the current task is scheduled to be awoken when progress can be made
), if a future change is made to this part of the codebase (like the change that caused #4860, for example), the bug could then be revealed.
I'll let you decide what you prefer, and I will understand either way 😊
from rust-libp2p.
I'll close this as not necessary. If you want, we can merge a documentation update that explains this @stormshield-frb ! Thank you for the work! :)
from rust-libp2p.
Related Issues (20)
- `Gossipsub`'s substreams keep all connections alive after `idle_connection_timeout`
- mergify continously approving approved pull requests HOT 6
- WebRTC connection doesn't close after timeout HOT 2
- Promote common dependencies to workspace level
- file-sharing works only on local interface HOT 1
- kad: FIND_NODE not conform to specs HOT 9
- Improve request/response documentation HOT 4
- Compilation on docs.rs is failing
- mdns tokio timer panics HOT 2
- Signature verification fails on handshake if 1024 bit RSA key is used HOT 2
- relay: panics due to unimplemented time in wasm HOT 2
- kad: consume `FromSwarm::NewExternalAddrOfPeer` HOT 14
- Reduce `NewExternalAddrCandidate` reports from `identify`
- kad: make `automatic_bootstrap_interval` publicly configurable
- request-response: Inconsistent documentation.
- request-response: Document request/response max sizes HOT 4
- Active streams affect `yamux::connection::rtt` HOT 10
- rendezvous: Example "discovering with identify" doesn't work HOT 4
- kad: make bucket size configurable HOT 4
- `libp2p_stream` stream deadlocks if using yamux 0.13 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-libp2p.