File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -786,6 +786,16 @@ impl Recv {
786
786
}
787
787
}
788
788
789
+ pub ( super ) fn maybe_reset_next_stream_id ( & mut self , id : StreamId ) {
790
+ if let Ok ( next_id) = self . next_stream_id {
791
+ // !Peer::is_local_init should have been called beforehand
792
+ debug_assert_eq ! ( id. is_server_initiated( ) , next_id. is_server_initiated( ) ) ;
793
+ if id >= next_id {
794
+ self . next_stream_id = id. next_id ( ) ;
795
+ }
796
+ }
797
+ }
798
+
789
799
/// Returns true if the remote peer can reserve a stream with the given ID.
790
800
pub fn ensure_can_reserve ( & self ) -> Result < ( ) , Error > {
791
801
if !self . is_push_enabled {
Original file line number Diff line number Diff line change @@ -883,6 +883,10 @@ impl Inner {
883
883
// We normally would open this stream, so update our
884
884
// next-send-id record.
885
885
self . actions . send . maybe_reset_next_stream_id ( id) ;
886
+ } else {
887
+ // We normally would recv this stream, so update our
888
+ // next-recv-id record.
889
+ self . actions . recv . maybe_reset_next_stream_id ( id) ;
886
890
}
887
891
888
892
let stream = Stream :: new ( id, 0 , 0 ) ;
You can’t perform that action at this time.
0 commit comments