I am trying to create a mini dashboard for my server that shows number of
"unfinished requests." (BTW if there's a better term for that let me know.)
Here is what I have, but I don't think it's catching all the response
finishes:
server.server.on("request", function (request, response) {
updateRequestCount(+1);
response.on("finish", function () {
updateRequestCount(-1);
});
});
If I log the request count to the console, it always increases, sometimes
going down by one, but usually going up much more than it goes down.
What event can I listen to to properly count requests?
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en