Skip to content

Commit

Permalink
after sending a new signalTimeout promise is required
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Sep 13, 2023
1 parent beef0eb commit f82e9eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AfController.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ class AfController extends EventEmitter {
resend = this.registerResend(cfg.dstAddr)
promises.push(resend.promise.then(()=>'signalResend'))
}
cfg.signalTimeout = Q.defer()
const result = await Q.cancelledRace(promises)

// Handle results for any of the promises that might have returned
if(result === 'signalResend'){
cfg.signalTimeout = Q.defer()
await await Q.cancelledRace([Q.delay(5000), workPromise]) // Wait at-least 5 seconds after a module error
}
else if(typeof result === 'number') {
Expand Down

0 comments on commit f82e9eb

Please sign in to comment.