File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -425,7 +425,12 @@ impl SessionAccept {
425425
426426 // Poll the list of pending streams.
427427 let ( typ, recv) = match ready ! ( self . pending_uni. poll_next_unpin( cx) ) {
428- Some ( res) => res?,
428+ Some ( Ok ( res) ) => res,
429+ Some ( Err ( err) ) => {
430+ // Ignore the error, the stream was probably reset early.
431+ tracing:: warn!( ?err, "failed to decode unidirectional stream" ) ;
432+ continue ;
433+ }
429434 None => return Poll :: Pending ,
430435 } ;
431436
@@ -491,7 +496,12 @@ impl SessionAccept {
491496
492497 // Poll the list of pending streams.
493498 let res = match ready ! ( self . pending_bi. poll_next_unpin( cx) ) {
494- Some ( res) => res?,
499+ Some ( Ok ( res) ) => res,
500+ Some ( Err ( err) ) => {
501+ // Ignore the error, the stream was probably reset early.
502+ tracing:: warn!( ?err, "failed to decode bidirectional stream" ) ;
503+ continue ;
504+ }
495505 None => return Poll :: Pending ,
496506 } ;
497507
Original file line number Diff line number Diff line change @@ -389,7 +389,12 @@ impl SessionAccept {
389389
390390 // Poll the list of pending streams.
391391 let ( typ, recv) = match ready ! ( self . pending_uni. poll_next_unpin( cx) ) {
392- Some ( res) => res?,
392+ Some ( Ok ( res) ) => res,
393+ Some ( Err ( err) ) => {
394+ // Ignore the error, the stream was probably reset early.
395+ log:: warn!( "failed to decode unidirectional stream: {err:?}" ) ;
396+ continue ;
397+ }
393398 None => return Poll :: Pending ,
394399 } ;
395400
@@ -455,7 +460,12 @@ impl SessionAccept {
455460
456461 // Poll the list of pending streams.
457462 let res = match ready ! ( self . pending_bi. poll_next_unpin( cx) ) {
458- Some ( res) => res?,
463+ Some ( Ok ( res) ) => res,
464+ Some ( Err ( err) ) => {
465+ // Ignore the error, the stream was probably reset early.
466+ log:: warn!( "failed to decode bidirectional stream: {err:?}" ) ;
467+ continue ;
468+ }
459469 None => return Poll :: Pending ,
460470 } ;
461471
You can’t perform that action at this time.
0 commit comments