Open vi opened 2 years ago
very cool, thanks for creating the issue. will take a look.
Note that fixing it portably may be problematic due to missing support of waiting for hangups without also waiting for read- or write-readiness. See https://github.com/tokio-rs/tokio/issues/3467 or https://github.com/tokio-rs/mio/issues/1476.
I have developed a special tool that checks corner cases of TCP forwarding regarding TCP resets/hangups while being backpressured. It shows discrepancy between connecting back through
tobaru
and, for example, throughsocat
.In comparison, the tool does not show errors for
socat
-based forwarder:Loopback test
tcptunnelchecker 127.0.0.1:1234 127.0.0.1:1234
also shows results similar tosocat
ones.