File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ class DuplexSocket extends Duplex {
2020 }
2121
2222 _write ( chunk , encoding , callback ) {
23- this [ kOtherSide ] . push ( chunk ) ;
24- if ( ! this [ kOtherSide ] . readableLength ) {
23+ if ( chunk . length === 0 ) {
2524 process . nextTick ( callback ) ;
2625 } else {
26+ this [ kOtherSide ] . push ( chunk ) ;
2727 this [ kOtherSide ] [ kCallback ] = callback ;
2828 }
2929 }
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ class DuplexSocket extends Duplex {
2424 _write ( chunk , encoding , callback ) {
2525 assert . notStrictEqual ( this [ kOtherSide ] , null ) ;
2626 assert . strictEqual ( this [ kOtherSide ] [ kCallback ] , null ) ;
27- this [ kOtherSide ] . push ( chunk ) ;
28- if ( ! this [ kOtherSide ] . readableLength ) {
27+ if ( chunk . length === 0 ) {
2928 process . nextTick ( callback ) ;
3029 } else {
30+ this [ kOtherSide ] . push ( chunk ) ;
3131 this [ kOtherSide ] [ kCallback ] = callback ;
3232 }
3333 }
You can’t perform that action at this time.
0 commit comments