File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -207,23 +207,25 @@ Timeout.prototype.refresh = function() {
207
207
} ;
208
208
209
209
Timeout . prototype . unref = function ( ) {
210
- if ( this [ kRefed ] && ! this . _destroyed ) {
210
+ if ( this [ kRefed ] ) {
211
211
this [ kRefed ] = false ;
212
- decRefCount ( ) ;
212
+ if ( ! this . _destroyed )
213
+ decRefCount ( ) ;
213
214
}
214
215
return this ;
215
216
} ;
216
217
217
218
Timeout . prototype . ref = function ( ) {
218
- if ( ! this [ kRefed ] && ! this . _destroyed ) {
219
+ if ( ! this [ kRefed ] ) {
219
220
this [ kRefed ] = true ;
220
- incRefCount ( ) ;
221
+ if ( ! this . _destroyed )
222
+ incRefCount ( ) ;
221
223
}
222
224
return this ;
223
225
} ;
224
226
225
227
Timeout . prototype . hasRef = function ( ) {
226
- return ! ! ( this [ kRefed ] && ! this . _destroyed ) ;
228
+ return this [ kRefed ] ;
227
229
} ;
228
230
229
231
function TimersList ( expiry , msecs ) {
You can’t perform that action at this time.
0 commit comments