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