Cosmetic cleanup

This commit is contained in:
Benjamin Saunders
2019-03-28 17:22:57 -07:00
committed by Dirkjan Ochtman
parent bdb73b8b85
commit 5cc3a52088
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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))
+1 -1
View File
@@ -764,7 +764,7 @@ impl io::Read for BiStream {
)),
Err(UnknownStream) => Err(io::Error::new(
io::ErrorKind::ConnectionAborted,
"unknown stream".to_string(),
"unknown stream",
)),
}
}