Skip to content

Instantly share code, notes, and snippets.

@arisolt
Last active December 11, 2015 21:59
Show Gist options
  • Save arisolt/4666263 to your computer and use it in GitHub Desktop.
Save arisolt/4666263 to your computer and use it in GitHub Desktop.
function error () {
console.log("timed out");
}
function main () {
setTimeout(function () {
error();
//halt
}, 1);
async.series([
function (cb) {
httprequest({...}, function () {
console.log("a");
cb();
}); // takes a few seconds to connect to webserver
},
function (cb) {
httprequest({...}, function () {
console.log("b");
cb();
});// takes a few more seconds to connect
}
],
function (err, result) {
}
);
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment