-
Notifications
You must be signed in to change notification settings - Fork 445
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
Stream ending does not emit event #939
Comments
Please note that it seems that pubsub is not aware that the stream is closed. Indeed, when a stream close, the peer should be removed from However, from local debugging + the fact that the |
Hey @D4nte Thanks for creating this issue. It would be great to have a test case for this in gossipsub. Starting by the expectations here. Two peers establish a libp2p connection, which will be used to create streams for given libp2p protocols (like identify, pubsub, ...). In other words, a connection will use a stream muxer to have multiple streams open within a connection. As a result, emitting a Zooming in into pubsub, we have 2 libp2p streams within pubsub context per connection. One will always be open to receive pubsub messages from other pubsub peers connected and one will be open to send pubsub messages and closed after it. This means, every time we want to send a message we open the write stream, send the message and close the stream. So, considering that the read stream is still open, it is expected that |
Hi @vasco-santos, Thank you for the information. I am not quite sure how I can reproduce in test as the stream being aborted comes from nginx timeout, when used as a proxy. I could play around with an |
@vasco-santos : should this issue be kept open, or will the work be tackled in #744 and #930? |
I have been spending some time trying to recreate in test environment. It looks like the streams are closed after exactly 10min of idle (TCP timeout?). This is something I am getting systematically in a browser environment over ws but could not reproduce in test. Something I do not understand is that:
When I look at I can see that it tries to get existing streams, it does not seem to attempt to open to send the message and then close it. What am I missing? |
Yes, I was thinking on #744 issue, apologies. More specifically, keeping connections alive. Let me know if you get a reproducible test though |
I wonder if #1221 helps with this issue. |
@D4nte did you ever manage to create a reproduction for this issue? |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
This issue was closed because it is missing author input. |
Severity: High
Description:
peer:disconnect
anderror
events,wss
.Expected: an event is emitted on
peer:disconnect
so that I can handle the stream closing.Actual: No error or event emitted on stream closure.
Steps to reproduce the error:
I assume I am missing something here so please let me know what is the expected usage of the API.
If my assumption of the expected behaviur is correct, let me know and I can try to write a minimal working example.
Or you can play with the project, it's the
web-chat
example of https://github.com/status-im/js-waku/The text was updated successfully, but these errors were encountered: