File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,9 @@ impl Recv {
248
248
// Only servers can receive a headers frame that initiates the stream.
249
249
// This is verified in `Streams` before calling this function.
250
250
if counts. peer ( ) . is_server ( ) {
251
+
252
+ // Correctness: never push a stream to `pending_accept` without having the
253
+ // corresponding headers frame pushed to `stream.pending_recv`.
251
254
self . pending_accept . push ( stream) ;
252
255
}
253
256
}
@@ -257,7 +260,10 @@ impl Recv {
257
260
258
261
/// Called by the server to get the request
259
262
///
260
- /// TODO: Should this fn return `Result`?
263
+ /// # Panics
264
+ ///
265
+ /// Panics if `stream.pending_recv` has no `Event::Headers` queued.
266
+ ///
261
267
pub fn take_request ( & mut self , stream : & mut store:: Ptr ) -> Request < ( ) > {
262
268
use super :: peer:: PollMessage :: * ;
263
269
You can’t perform that action at this time.
0 commit comments