Closed privacyguard closed 1 week ago
Thanks for opening this. I think we should handle the case where the remote has pinged us and closed the connection, it's in the spec so we shouldn't be logging error messages.
I can't push changes to this branch (possibly due to your org settings) so I've opened #2822 which incorporates the commit from here.
Closing in favour of #2822
@achingbrain no worries! Glad we could help.
Gracefully handle remote stream closure
Description
This PR fixes the UnexpectedEOFError issue. This issue happens because the ping protocol does not handle the case where the remote peer closes the stream and with the introduction of
connectionMonitor
this became an issue. It opens a stream for the ping protocol, sends a ping, gets the response then closes the stream. The local peer throws an exception and triggers a yamux reset.Notes & open questions
We only tested these changes in the context described above. Not sure if there are other cases to handle.
Change checklist