Skip to content

Commit

Permalink
handle src rtg changing
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Sep 13, 2023
1 parent 2f4d44c commit 18fdb74
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/Af.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,14 @@ class Af extends EventEmitter {
} catch(ex){
if(ex.status == 178) { // ZApsTableFull
wf.cancel()
await Q.delay(Math.random() + 0.5 * 16000)
areqCancelable.delete(wf)
areqCancelable._cancels.delete(wf)
await Q.delay((Math.random() + 0.5) * 16000)

// in case the src rtg changed
const srcRtg = dstEp.getSrcRtg()
if(!srcRtg) break;
Object.assign(newAfParams, Af.buildAfSrcRtg(srcRtg))

continue
} else {
throw ex
Expand All @@ -351,8 +357,8 @@ class Af extends EventEmitter {
} catch(ex){
if(ex.status == 178) { // ZApsTableFull
wf.cancel()
await Q.delay(Math.random() + 0.5 * 16000)
areqCancelable.delete(wf)
areqCancelable._cancels.delete(wf)
await Q.delay((Math.random() + 0.5) * 16000)
continue
} else {
throw ex
Expand Down

0 comments on commit 18fdb74

Please sign in to comment.