Skip to content

Commit

Permalink
Merge pull request Netflix#826 from mattrjacobs/safely-handle-negativ…
Browse files Browse the repository at this point in the history
…e-delay

Safely handle negative input on the delay input to metrics-stream
  • Loading branch information
mattrjacobs committed Jun 21, 2015
2 parents 61152a0 + a2b2dc6 commit 14a4611
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void handleRequest(HttpServletRequest request, HttpServletResponse respo
try {
String d = request.getParameter("delay");
if (d != null) {
delay = Integer.parseInt(d);
delay = Math.max(Integer.parseInt(d), 1);
}
} catch (Exception e) {
// ignore if it's not a number
Expand Down

0 comments on commit 14a4611

Please sign in to comment.