summaryrefslogtreecommitdiff
path: root/lib/_http_common.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-08-23 00:31:44 +0200
committerTrevor Norris <trev.norris@gmail.com>2014-09-05 09:34:15 -0700
commitb33a47ef473c169be2f11a2ee434f0f89ea1d106 (patch)
treee8e200e9f32a0692df26cf594003219ace933077 /lib/_http_common.js
parent1e99486cc83d0e3c41de37c924150f2853870902 (diff)
downloadandroid-node-v8-b33a47ef473c169be2f11a2ee434f0f89ea1d106.tar.gz
android-node-v8-b33a47ef473c169be2f11a2ee434f0f89ea1d106.tar.bz2
android-node-v8-b33a47ef473c169be2f11a2ee434f0f89ea1d106.zip
lib, src: don't make http parser handles weak
Weak handles put strain on the garbage collector and the parser handle doesn't need to be weak in the first place. This change should improve GC times on busy servers a little. Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'lib/_http_common.js')
-rw-r--r--lib/_http_common.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/_http_common.js b/lib/_http_common.js
index b5995476e5..f3d9d4a2eb 100644
--- a/lib/_http_common.js
+++ b/lib/_http_common.js
@@ -200,7 +200,8 @@ function freeParser(parser, req) {
parser.socket.parser = null;
parser.socket = null;
parser.incoming = null;
- parsers.free(parser);
+ if (parsers.free(parser) === false)
+ parser.close();
parser = null;
}
if (req) {