Skip to content

Commit 14a4611

Browse files
committed
Merge pull request #826 from mattrjacobs/safely-handle-negative-delay
Safely handle negative input on the delay input to metrics-stream
2 parents 61152a0 + a2b2dc6 commit 14a4611

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hystrix-contrib/hystrix-metrics-event-stream/src/main/java/com/netflix/hystrix/contrib/metrics/eventstream/HystrixMetricsStreamServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private void handleRequest(HttpServletRequest request, HttpServletResponse respo
124124
try {
125125
String d = request.getParameter("delay");
126126
if (d != null) {
127-
delay = Integer.parseInt(d);
127+
delay = Math.max(Integer.parseInt(d), 1);
128128
}
129129
} catch (Exception e) {
130130
// ignore if it's not a number

0 commit comments

Comments
 (0)