Skip to content

Commit 4e2f999

Browse files
Yosuke FurukawaFishrock123
Yosuke Furukawa
authored andcommitted
test: fix infinite loop detection
Fixes: #1675 PR-URL: #1681 Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 7693705 commit 4e2f999

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)