File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ impl RecvHalfConnection {
696
696
let count = self . 0 . rst_count . get ( ) + 1 ;
697
697
let streams_count = self . 0 . streams_count . get ( ) ;
698
698
if streams_count >= 10 && count >= streams_count >> 1 {
699
- Err ( Either :: Left ( ConnectionError :: ConcurrencyOverflow ) )
699
+ Err ( Either :: Left ( ConnectionError :: StreamResetsLimit ) )
700
700
} else {
701
701
self . 0 . rst_count . set ( count) ;
702
702
Ok ( ( ) )
Original file line number Diff line number Diff line change 71
71
}
72
72
Err ( Either :: Right ( err) ) => {
73
73
let ( stream, kind) = err. into_inner ( ) ;
74
- log:: error!( "{}: Failed to handle message: {:?}" , stream. tag( ) , stream) ;
74
+ log:: error!(
75
+ "{}: Failed to handle message, err: {:?} stream: {:?}" ,
76
+ stream. tag( ) ,
77
+ kind,
78
+ stream
79
+ ) ;
75
80
76
81
stream. set_failed_stream ( kind. into ( ) ) ;
77
82
self . connection
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ pub enum ConnectionError {
33
33
WindowValueOverflow ,
34
34
#[ error( "Max concurrent streams count achieved" ) ]
35
35
ConcurrencyOverflow ,
36
+ #[ error( "Stream rapid reset count achieved" ) ]
37
+ StreamResetsLimit ,
36
38
/// Keep-alive timeout
37
39
#[ error( "Keep-alive timeout" ) ]
38
40
KeepaliveTimeout ,
@@ -72,6 +74,8 @@ impl ConnectionError {
72
74
. set_data ( "Updated value for window is overflowed" ) ,
73
75
ConnectionError :: ConcurrencyOverflow => GoAway :: new ( Reason :: FLOW_CONTROL_ERROR )
74
76
. set_data ( "Max concurrent streams count achieved" ) ,
77
+ ConnectionError :: StreamResetsLimit => GoAway :: new ( Reason :: FLOW_CONTROL_ERROR )
78
+ . set_data ( "Stream rapid reset count achieved" ) ,
75
79
ConnectionError :: KeepaliveTimeout => {
76
80
GoAway :: new ( Reason :: NO_ERROR ) . set_data ( "Keep-alive timeout" )
77
81
}
You can’t perform that action at this time.
0 commit comments