mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: fix infinite loop detection
Fixes: https://github.com/iojs/io.js/issues/1675 PR-URL: https://github.com/iojs/io.js/pull/1681 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
parent
76937051f8
commit
4e2f999a62
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user