File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,7 +303,8 @@ function initStream (self) {
303303 }
304304 if ( secureBytesRead === null && ! self . server ) {
305305 // Client needs to write as part of handshake
306- this . _writeWatcher . start ( ) ;
306+ self . _writeWatcher . start ( ) ;
307+ return ;
307308 }
308309 } else {
309310 bytesRead = read ( self . fd ,
@@ -312,7 +313,6 @@ function initStream (self) {
312313 pool . length - pool . used ) ;
313314 }
314315 } catch ( e ) {
315- if ( this . forceClose ) this . forceClose ( e ) ;
316316 self . destroy ( e ) ;
317317 return ;
318318 }
@@ -523,7 +523,7 @@ Stream.prototype._writeOut = function (data, encoding) {
523523 if ( this . secure ) return false ;
524524 else throw new Error ( 'Stream is not writable' ) ;
525525 }
526- if ( data . length == 0 ) return true ;
526+ if ( ! this . secure && data . length == 0 ) return true ;
527527
528528 var buffer , off , len ;
529529 var bytesWritten , charsWritten ;
You can’t perform that action at this time.
0 commit comments