Commit 6b97cc7 Aitor Magán García
committed
1 parent 79cbb39 commit 6b97cc7 Copy full SHA for 6b97cc7
File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,12 @@ exports.longFailingTimeout = 10000;
106
106
*/
107
107
exports . minQuorum = 2 ;
108
108
109
+ /*
110
+ Max retry time (milliseconds)
111
+ the sum of the different retry intervals must be less than this value
112
+ */
113
+ exports . maxRetryTime = 20 * 60 * 1000 ; //20 mins
114
+
109
115
110
116
/* LISTENER AND CONSUMER CONFIGURATION
111
117
======================================
Original file line number Diff line number Diff line change @@ -165,6 +165,20 @@ function validateHeaders(simpleRequest) {
165
165
166
166
errorsHeaders . push ( error ) ;
167
167
}
168
+
169
+ var sum = 0 ;
170
+ for ( var i = 0 ; i < retrySplit . length ; i ++ ) {
171
+ sum += Number ( retrySplit [ i ] ) ;
172
+ }
173
+
174
+ if ( sum > configGlobal . maxRetryTime ) {
175
+ var error = { }
176
+ error . type = MG . INVALID_PARAMETER ;
177
+ error . parameter = MG . HEAD_RELAYER_RETRY ;
178
+ error . userMessage = 'The sum of the different intervals must be less than ' + configGlobal . maxRetryTime + ' ms' ;
179
+
180
+ errorsHeaders . push ( error ) ;
181
+ }
168
182
}
169
183
170
184
//check Persistence Header
You can’t perform that action at this time.
0 commit comments