From 32dcb2adfa1a6939af3cd92e152cd5020871e210 Mon Sep 17 00:00:00 2001 From: two56 Date: Mon, 21 Aug 2023 12:46:53 +0100 Subject: [PATCH] Cancel the transaction instead of killing the task (#431) Co-authored-by: Matt Preskett Co-authored-by: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> --- lib/tasks/rest_dial.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tasks/rest_dial.js b/lib/tasks/rest_dial.js index f5642a84..bdf2f782 100644 --- a/lib/tasks/rest_dial.js +++ b/lib/tasks/rest_dial.js @@ -128,7 +128,10 @@ class TaskRestDial extends Task { _onCallTimeout() { this.logger.debug('TaskRestDial: timeout expired without answer, killing task'); this.timer = null; - this.kill(this.cs); + if (this.canCancel) { + this.canCancel = false; + this.cs?.req?.cancel(); + } } _onAmdEvent(cs, evt) {