Last active
December 21, 2015 05:49
-
-
Save isaacs/6259465 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/_http_client.js b/lib/_http_client.js | |
index 63f5ee9..b3a4d84 100644 | |
--- a/lib/_http_client.js | |
+++ b/lib/_http_client.js | |
@@ -101,7 +101,10 @@ function ClientRequest(options, cb) { | |
self._renderHeaders()); | |
} | |
- if (self.socketPath) { | |
+ if (options.socket) { | |
+ // someone already did it for us. how thoughtful. | |
+ self.onSocket(options.socket); | |
+ } else if (self.socketPath) { | |
self._last = true; | |
self.shouldKeepAlive = false; | |
var conn = self.agent.createConnection({ path: self.socketPath }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment