Skip to content

Commit e7427ae

Browse files
Yosuke FurukawaFishrock123
Yosuke Furukawa
authored andcommitted
test: fix infinite loop detection
Fixes: nodejs#1675 PR-URL: nodejs#1681 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent e05afd7 commit e7427ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-dgram-send-callback-recursive.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ const chunk = 'abc';
88
var recursiveCount = 0;
99
var received = 0;
1010
const limit = 10;
11+
const recursiveLimit = limit + 1;
1112

1213
function onsend() {
13-
if (recursiveCount > limit) {
14+
if (recursiveCount > recursiveLimit) {
1415
throw new Error('infinite loop detected');
1516
}
1617
if (received < limit) {

0 commit comments

Comments
 (0)