http: remove redundant code in _deferToConnect
authorMalcolm Ahoy <malcolmahoy@gmail.com>
Wed, 9 Sep 2015 13:11:19 +0000 (06:11 -0700)
committerRod Vagg <rod@vagg.org>
Tue, 22 Sep 2015 22:39:33 +0000 (08:39 +1000)
commitf68fed2e6ff008cd0464831d4b1f081be1f65efc
tree4e295bfbff3cde793e6ace2eada6f775dac9cb34
parentcb971cc97d217119ab8b3526cf9471caa3ba6ba7
http: remove redundant code in _deferToConnect

Logic for calling the passed in socket method and/or callback
was duplicated. This commit refactors the relevant code to
remove the redundancy.

PR-URL: https://github.com/nodejs/node/pull/2769
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
lib/_http_client.js