Skip to content

Instantly share code, notes, and snippets.

@mmalecki
Created February 20, 2012 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmalecki/79c8e2075bbe4a157a07 to your computer and use it in GitHub Desktop.
Save mmalecki/79c8e2075bbe4a157a07 to your computer and use it in GitHub Desktop.
diff --git a/lib/tls.js b/lib/tls.js
index 4d7da1d..02186e5 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -1064,12 +1064,12 @@ exports.connect = function(/* [port, host], options, cb */) {
var options = {}, cb;
if (typeof arguments[0] === 'object') {
- options = arguments[0];
+ util._extend(options, arguments[0]);
} else if (typeof arguments[1] === 'object') {
- options = arguments[1];
+ util._extend(options, arguments[1]);
options.port = arguments[0];
} else if (typeof arguments[2] === 'object') {
- options = arguments[2];
+ util._extend(options, arguments[2]);
options.port = arguments[0];
options.host = arguments[1];
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment