mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
With Upgrade or CONNECT request, http.ClientRequest emits 'close' event after its socket is closed. However, after receiving a response, the socket is not under management by the request. http.ClientRequest should detach the socket before 'upgrade'/'connect' event is emitted to pass the socket to a user. After that, it should emit 'close' event immediately without waiting for closing of the socket. Fixes #2510.