I'm trying out the connect-timeout module.
I've tried hitting a simple route from the browser
var timeout = require('connect-timeout');
app.use(timeout('1s'));
app.use(haltOnTimedout);
app.get('/timeout', function (req, res) {
for (var i = 0; i < 1111211111; i++) {}
res.send('d')
})
function haltOnTimedout(req, res, next){
if (!req.timedout) next();
}
But I'm always getting back in the browser (I thought the timeout would prevent it). Anything I'm not getting here?