I have several Express applications, and I see that in some modules res.end() is called at the end of the request handler (after res.send or res.json ), while in others it is not called.
For example:
app.get('/test', function(req, res) { res.send('Test', 200); });
or
app.get('/test', function(req, res) { res.send('Test', 200); res.end(); });
Both cases work, but I'm afraid to leak or end file descriptors or something like that when I run a lot of requests. Which one is "more correct"?
greuze Dec 03 '13 at 15:29 2013-12-03 15:29
source share