Notify send_tasks when there is a connection error (#231)
This commit is contained in:
		
				
					committed by
					
						 Carl Lerche
						Carl Lerche
					
				
			
			
				
	
			
			
			
						parent
						
							ad90f9b97b
						
					
				
				
					commit
					e3c6e0c590
				
			| @@ -699,9 +699,6 @@ impl Prioritize { | ||||
|  | ||||
|                 counts.inc_num_send_streams(); | ||||
|                 self.pending_send.push(&mut stream); | ||||
|                 if let Some(task) = stream.open_task.take() { | ||||
|                     task.notify(); | ||||
|                 } | ||||
|             } else { | ||||
|                 return; | ||||
|             } | ||||
|   | ||||
| @@ -595,6 +595,7 @@ impl Recv { | ||||
|     ) -> Result<(), RecvError> { | ||||
|         // Notify the stream | ||||
|         stream.state.recv_reset(frame.reason()); | ||||
|         stream.notify_send(); | ||||
|         stream.notify_recv(); | ||||
|         Ok(()) | ||||
|     } | ||||
| @@ -605,6 +606,7 @@ impl Recv { | ||||
|         stream.state.recv_err(err); | ||||
|  | ||||
|         // If a receiver is waiting, notify it | ||||
|         stream.notify_send(); | ||||
|         stream.notify_recv(); | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -64,9 +64,6 @@ pub(super) struct Stream { | ||||
|     /// Set to true when the stream is pending to be opened | ||||
|     pub is_pending_open: bool, | ||||
|  | ||||
|     /// Task tracking when stream can be "opened", or initially sent to socket. | ||||
|     pub open_task: Option<task::Task>, | ||||
|  | ||||
|     // ===== Fields related to receiving ===== | ||||
|     /// Next node in the accept linked list | ||||
|     pub next_pending_accept: Option<store::Key>, | ||||
| @@ -168,7 +165,6 @@ impl Stream { | ||||
|             send_capacity_inc: false, | ||||
|             is_pending_open: false, | ||||
|             next_open: None, | ||||
|             open_task: None, | ||||
|  | ||||
|             // ===== Fields related to receiving ===== | ||||
|             next_pending_accept: None, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user