Closed njeisecke closed 2 years ago
Seems this is not enough.
Could it be that GenericSocketBackend::peer_disconnect must also remove the peer from fair_queue?
@Alexei-Kornienko, could you please confirm (or deny) this being the proper way to handle errors? Thanks.
Mostly LGTM. I guess we can merge this. Could you please remove dbg! from the code? I think that we should use some other way to log error instead of just writing it to stderr (maybe use tracing
crate?).
Thanks for reviewing. I think using the tracing
crate would be a good idea so that the application can decide how to log this. For now I've removed the dbg!
.
ConnectionReset is a common error that occurs here.
Invoking peer_disconnected regardless of the error might be a little coarse but that should be better than raising a panic.