http: use socket.once, not socket.on
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 1 Mar 2013 12:01:53 +0000 (13:01 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 1 Mar 2013 12:11:40 +0000 (13:11 +0100)
commitf26362e9381d88d4c906e3624f90fc76e9087c20
tree0472a422e86eaf627c402b57bc968e665c98b072
parent50ba0f27d9a14473201c93fab09c2c6cf96c063b
http: use socket.once, not socket.on

Register the 'close' event listener with .once(), not .on().

It doesn't matter in the grand scheme of things because the listener
doesn't keep references to any heavy-weight objects but using .once()
for a oneshot listener is something of a best practice.
lib/http.js