Closed Stebalien closed 5 years ago
tests fail...
Yeah, we expect a nice EOF.
we need the Shutdown
call already.
Close
to mean "close both ways" (with a sane default timeout), Reset
to mean "throw everything away", and then yeah, CloseWrite
and CloseRead
.The test failure seems insurmountable, we'll need to change the stream API for this to work :(
Not necessarily. The test failure is due to the assumption that conn.Close()
flushes. However, conn.Close()
actually resets in our TCP transport as well (for efficiency) so this isn't really an issue.
But I agree this sucks.
@vyzo, this is getting really critical and both the TCP and the QUIC transports reset the underlying connection on close without flushing anything (I specifically modified the TCP transport to do this to avoid unnecessary work). This bug likely just crashed our gateways and has been causing problems for a ton of people.
The only other solution I can think of is to:
But that requires fixing multiple annoying bugs. I've started on this path (with the yamux fix) but it feels like a waste given that we don't actually make any guarantees about Close flushing.
Sigh... If it has been identified as the critical bug, then we got to merge it.
Sigh... If it has been identified as the critical bug, then we got to merge it.
Well, Close is stalling. I'll try shipping a patch to some of our partners to make sure this is the bug.
This needs a rebase for the go mod debacle (go.sum conflicts)
rebased and resolved the conflict; should be ready for merge.
we also need the companion in #77, so that the connection manager doesn't kill the underlying hop relay connections when they have stop streams.
May fix https://github.com/ipfs/go-ipfs/issues/6237
Basically,
Close
waits). Also, https://github.com/libp2p/go-mplex/issues/9This may also fix a stream leak.