From cb3b2912e77ca8670c30ee87e763335f359a18dc Mon Sep 17 00:00:00 2001 From: Sean Lavine Date: Mon, 7 Apr 2014 16:34:44 -0700 Subject: [PATCH] verbose explanation of done() --- Example.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Example.md b/Example.md index 982e438..f538e2d 100644 --- a/Example.md +++ b/Example.md @@ -17,7 +17,11 @@ var server = http.createServer(function(req, res, next) { // no error occurred, continue with the request if(!err) return false; - // an error occurred, remove the client from the connection pool + // An error occurred, remove the client from the connection pool. + // A truthy value passed to done will remove the connection from the pool + // instead of simply returning it to be re-used. + // In this case, if we have successfully, received a client (truthy) + // then it will be removed from the pool. done(client); next(err); return true;