Open hawkw opened 8 months ago
some notes about the design given here:
i think the best way to propagate connection RESETs is to stick a first-class notion of "channel closed with error" into tricky-pipe
.
also, it would be nice if an attempt to send a message through a DeserSender
that results in a deserialize error also sent the deserialize error to the receiver, as well as returning it to the sender...
right now (as of 87dc51da19352e20964ef962d27ecdb52cc7b95a) we handle frame decode/encode errors by "just skipping the frame", and wire errors by "just stop running the interface". here's what we should do instead, IMO:
DATA
orCONNECT
frame, then: send an error back to the local conn?ACK
,NAK
orRESET
then: we're probably fucked, blow up the whole link?RESET
due to a previous error, then: hahaha we're Super Fucked, destroy everything as violently as possibleimo if the
Wire
sees an error that it's capable of retrying or believes to be ignorable, it should just ... do that? and the only errors that should bubble up from theWire
are fatal-ish and should blow up the whole interface.currently, wire errors just make us stop the interface state machine. they should actually send errors on all existing local connections.