@@ -35,9 +35,7 @@ impl AsyncSessionStream for TcpStream {
3535 }
3636
3737 match sess. block_directions ( ) {
38- BlockDirections :: None => {
39- unreachable ! ( "" )
40- }
38+ BlockDirections :: None => continue ,
4139 BlockDirections :: Inbound => {
4240 assert ! ( expected_block_directions. is_readable( ) ) ;
4341
@@ -77,9 +75,7 @@ impl AsyncSessionStream for TcpStream {
7775 }
7876
7977 match sess. block_directions ( ) {
80- BlockDirections :: None => {
81- unreachable ! ( "" )
82- }
78+ BlockDirections :: None => return Poll :: Pending ,
8379 BlockDirections :: Inbound => {
8480 assert ! ( expected_block_directions. is_readable( ) ) ;
8581
@@ -135,9 +131,7 @@ impl AsyncSessionStream for UnixStream {
135131 }
136132
137133 match sess. block_directions ( ) {
138- BlockDirections :: None => {
139- unreachable ! ( "" )
140- }
134+ BlockDirections :: None => continue ,
141135 BlockDirections :: Inbound => {
142136 assert ! ( expected_block_directions. is_readable( ) ) ;
143137
@@ -177,9 +171,7 @@ impl AsyncSessionStream for UnixStream {
177171 }
178172
179173 match sess. block_directions ( ) {
180- BlockDirections :: None => {
181- unreachable ! ( "" )
182- }
174+ BlockDirections :: None => return Poll :: Pending ,
183175 BlockDirections :: Inbound => {
184176 assert ! ( expected_block_directions. is_readable( ) ) ;
185177
0 commit comments