File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -1122,19 +1122,13 @@ class Http2Session extends EventEmitter {
11221122
11231123 ref ( ) {
11241124 if ( this [ kSocket ] ) {
1125- assert ( this [ kSocket ] . _handle ) ;
1126- if ( typeof this [ kSocket ] . _handle . ref === 'function' ) {
1127- this [ kSocket ] . ref ( ) ;
1128- }
1125+ this [ kSocket ] . ref ( ) ;
11291126 }
11301127 }
11311128
11321129 unref ( ) {
11331130 if ( this [ kSocket ] ) {
1134- assert ( this [ kSocket ] . _handle ) ;
1135- if ( typeof this [ kSocket ] . _handle . unref === 'function' ) {
1136- this [ kSocket ] . unref ( ) ;
1137- }
1131+ this [ kSocket ] . unref ( ) ;
11381132 }
11391133 }
11401134}
Original file line number Diff line number Diff line change @@ -1140,7 +1140,9 @@ Socket.prototype.ref = function() {
11401140 return this ;
11411141 }
11421142
1143- this . _handle . ref ( ) ;
1143+ if ( typeof this . _handle . ref === 'function' ) {
1144+ this . _handle . ref ( ) ;
1145+ }
11441146
11451147 return this ;
11461148} ;
@@ -1152,7 +1154,9 @@ Socket.prototype.unref = function() {
11521154 return this ;
11531155 }
11541156
1155- this . _handle . unref ( ) ;
1157+ if ( typeof this . _handle . unref === 'function' ) {
1158+ this . _handle . unref ( ) ;
1159+ }
11561160
11571161 return this ;
11581162} ;
You can’t perform that action at this time.
0 commit comments