File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @ngnjs/queue" ,
3- "version" : " 1.0.0-alpha.4 " ,
4- "description" : " A lightweight NGN queue/ taskrunner." ,
3+ "version" : " 1.0.0-alpha.5 " ,
4+ "description" : " A lightweight NGN queue ( taskrunner) ." ,
55 "type" : " module" ,
66 "main" : " src/index.js" ,
77 "module" : " index.js" ,
Original file line number Diff line number Diff line change @@ -297,9 +297,11 @@ export default class Queue extends EventEmitter {
297297 }
298298
299299 abort ( timeout = false , task ) {
300- this . #cancelled = true
301- clearTimeout ( this . #timer)
302- this . _status = timeout ? 'timeout' : 'aborting'
303- this . emit ( timeout ? 'timeout' : 'aborted' , task )
300+ if ( ! this . #cancelled) {
301+ this . #cancelled = true
302+ clearTimeout ( this . #timer)
303+ this . _status = timeout ? 'timeout' : 'aborting'
304+ this . emit ( timeout ? 'timeout' : 'aborted' , task )
305+ }
304306 }
305307}
You can’t perform that action at this time.
0 commit comments