ignore received frames on a stream locally reset for some time (#174)
- Adds config duration for how long to ignore frames on a reset stream - Adds config for how many reset streams can be held at a time
This commit is contained in:
		| @@ -289,6 +289,21 @@ where | ||||
|  | ||||
|         None | ||||
|     } | ||||
|  | ||||
|     pub fn pop_if<'a, R, F>(&mut self, store: &'a mut R, f: F) -> Option<store::Ptr<'a>> | ||||
|     where | ||||
|         R: Resolve, | ||||
|         F: Fn(&Stream) -> bool, | ||||
|     { | ||||
|         if let Some(idxs) = self.indices { | ||||
|             let should_pop = f(&store.resolve(idxs.head)); | ||||
|             if should_pop { | ||||
|                 return self.pop(store); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         None | ||||
|     } | ||||
| } | ||||
|  | ||||
| // ===== impl Ptr ===== | ||||
| @@ -299,6 +314,10 @@ impl<'a> Ptr<'a> { | ||||
|         self.key | ||||
|     } | ||||
|  | ||||
|     pub fn store_mut(&mut self) -> &mut Store { | ||||
|         &mut self.store | ||||
|     } | ||||
|  | ||||
|     /// Remove the stream from the store | ||||
|     pub fn remove(self) -> StreamId { | ||||
|         // The stream must have been unlinked before this point | ||||
|   | ||||
		Reference in New Issue
	
	Block a user