Comments (2)
I would say that it is more like the stream acceptance callback is called too late.
I got the same issue during bitswap message receiving from a remote go-ipfs peer. The go-ipfs peers sends 3 frames:
- frame.type WINDOW_UPDATE (1 '\x1')
frame.length 0
frame.flags 1 - frame.type DATA (0 '\0')
frame.length 248
frame.flags 0 - frame.type WINDOW_UPDATE (1 '\x1')
frame.length 0
frame.flags 4
The last frame contains FIN flag that leads to onFINReceived call. Protocol handler is not called neither after the 1st frame nor after the second one. It is called when the last frame received, some response sent to the remote ipfs peer and Multiselect instance is closed. By that time the yamux stream has already been tagged as Unreadable.
from cpp-libp2p.
Detailed investigation has shown that YamuxStream::doRead returns corresponding error
cpp-libp2p/src/muxer/yamux/yamux_stream.cpp
Line 447 in 91d58f2
cpp-libp2p/src/muxer/yamux/yamux_stream.cpp
Line 425 in 91d58f2
I'm not sure what is a semantics of YamuxStream::isClosedForRead method but it looks like the size of pending data should be checked within the method also.
from cpp-libp2p.
Related Issues (20)
- mismatched tags on IdentityManager prototype HOT 1
- inconsistent use of BOOST_ASIO_NO_DEPRECATED is unnecessary and dangerous HOT 1
- Yamux newStream does not work
- Can we have a chat community ? HOT 1
- Not able to see other machine's messages in gossip chat example HOT 1
- Cannot connect two machines in the same network with rendezvous chat example
- Hunter build errors from package soralog
- Should consider building with vcpkg HOT 3
- SECIO is deprecated
- Question: autoNAT implementation
- Segmentation fault when receiving empty protobuf message HOT 1
- Remove ambiguous argument
- Way to compile for embedded systems HOT 1
- It is unclear how to add cpp-libp2p to a new project
- Is there a guide on the libp2p C++ ?
- got failed to do cmake configuration -- Ubuntu-20.04 and gcc-9.4 HOT 1
- Refactor unsafe code HOT 1
- 使用 example/02-kademlia/rendezvous_chat.cpp 遇到的问题 HOT 1
- yamux stream destructor
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 cpp-libp2p.