mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-23 11:45:25 +00:00
Cosmetic cleanup
This commit is contained in:
committed by
Dirkjan Ochtman
parent
bdb73b8b85
commit
5cc3a52088
@@ -2825,7 +2825,7 @@ impl Connection {
|
||||
debug_assert!(self.side.is_client());
|
||||
debug!(self.log, "0-RTT rejected");
|
||||
self.accepted_0rtt = false;
|
||||
self.streams.reset(self.side);
|
||||
self.streams.zero_rtt_rejected(self.side);
|
||||
// Discard already-queued frames
|
||||
self.space_mut(SpaceId::Data).pending = Retransmits::default();
|
||||
// Discard 0-RTT packets
|
||||
|
||||
@@ -117,8 +117,8 @@ impl Streams {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset(&mut self, side: Side) {
|
||||
// Reset all outgoing streams
|
||||
pub fn zero_rtt_rejected(&mut self, side: Side) {
|
||||
// Revert to initial state for outgoing streams
|
||||
for i in 0..self.next_bi {
|
||||
self.streams
|
||||
.remove(&StreamId::new(side, Directionality::Bi, i))
|
||||
|
||||
@@ -764,7 +764,7 @@ impl io::Read for BiStream {
|
||||
)),
|
||||
Err(UnknownStream) => Err(io::Error::new(
|
||||
io::ErrorKind::ConnectionAborted,
|
||||
"unknown stream".to_string(),
|
||||
"unknown stream",
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user