File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ function connect() {
94
94
socket . setTimeout ( options . timeout ) ;
95
95
}
96
96
97
- return Socket . prototype . connect . call ( socket , options , cb ) ;
97
+ return realConnect . call ( socket , options , cb ) ;
98
98
}
99
99
100
100
@@ -921,7 +921,11 @@ Socket.prototype.connect = function() {
921
921
const normalized = normalizeArgs ( args ) ;
922
922
const options = normalized [ 0 ] ;
923
923
const cb = normalized [ 1 ] ;
924
+ return realConnect . call ( this , options , cb ) ;
925
+ } ;
926
+
924
927
928
+ function realConnect ( options , cb ) {
925
929
if ( this . write !== Socket . prototype . write )
926
930
this . write = Socket . prototype . write ;
927
931
@@ -962,7 +966,7 @@ Socket.prototype.connect = function() {
962
966
lookupAndConnect ( this , options ) ;
963
967
}
964
968
return this ;
965
- } ;
969
+ }
966
970
967
971
968
972
function lookupAndConnect ( self , options ) {
You can’t perform that action at this time.
0 commit comments