File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -64,13 +64,6 @@ Connection.prototype.connect = function(cb) {
64
64
? Net . createConnection ( this . config . socketPath )
65
65
: Net . createConnection ( this . config ) ;
66
66
67
- // Node v0.10+ Switch socket into "old mode" (Streams2)
68
- //this._socket.on("data",function() {});
69
-
70
- //this._socket.pipe(this._protocol);
71
- //this._protocol.pipe(this._socket);
72
-
73
-
74
67
var connection = this ;
75
68
this . _protocol . on ( 'data' , function ( data ) {
76
69
connection . _socket . write ( data ) ;
@@ -81,6 +74,9 @@ Connection.prototype.connect = function(cb) {
81
74
this . _protocol . on ( 'end' , function ( ) {
82
75
connection . _socket . end ( )
83
76
} ) ;
77
+ this . _socket . on ( 'end' , function ( err ) {
78
+ connection . _protocol . end ( ) ;
79
+ } ) ;
84
80
85
81
this . _socket . on ( 'error' , this . _handleNetworkError . bind ( this ) ) ;
86
82
this . _socket . on ( 'connect' , this . _handleProtocolConnect . bind ( this ) ) ;
You can’t perform that action at this time.
0 commit comments