Skip to content

Commit

Permalink
test: fix infinite loop detection
Browse files Browse the repository at this point in the history
Fixes: #1675
PR-URL: #1681
Reviewed-By: Jeremiah Senkpiel <[email protected]>
  • Loading branch information
Yosuke Furukawa authored and Fishrock123 committed May 14, 2015
1 parent 7693705 commit 4e2f999
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-dgram-send-callback-recursive.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ const chunk = 'abc';
var recursiveCount = 0;
var received = 0;
const limit = 10;
const recursiveLimit = limit + 1;

function onsend() {
if (recursiveCount > limit) {
if (recursiveCount > recursiveLimit) {
throw new Error('infinite loop detected');
}
if (received < limit) {
Expand Down

0 comments on commit 4e2f999

Please sign in to comment.