Promote SendRequest::pending to an OpaqueStreamRef. (#281)
Because `self.pending` doesn't necessarily get cleaned up in a timely fashion - rather, only when the user calls `poll_ready()` - it was possible for it to refer to a stream that has already been closed. This would lead to a panic the next time that `poll_ready()` was called. Instead, use an `OpaqueStreamRef`, bumping the refcount. A change to an existing test is included which demonstrates the issue.
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							1b9469ff75
						
					
				
				
					commit
					23234fa14f
				
			| @@ -12,7 +12,6 @@ mod streams; | ||||
| pub(crate) use self::prioritize::Prioritized; | ||||
| pub(crate) use self::recv::Open; | ||||
| pub(crate) use self::send::PollReset; | ||||
| pub(crate) use self::store::Key; | ||||
| pub(crate) use self::streams::{StreamRef, OpaqueStreamRef, Streams}; | ||||
|  | ||||
| use self::buffer::Buffer; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user