Everything is running smoothly with the code as I initiate the request. It progresses and launches multiple requests consecutively, just as intended.
However, after a few moments, the script abruptly halts—this is definitely not the desired outcome. I am uncertain of the root cause behind this issue, so any assistance in troubleshooting would be greatly valued.
var http = require('http');
var options = {
host: '',
};
var i = 0;
var ii = 0;
callback = function(response) {
i++;
ii++;
if (i == 100)
{
i = 0;
console.log(ii);
}
}
function get()
{
http.request(options, callback).end();
setTimeout(function(){ get() }, 10);
}
get();