Skip to content

Commit

Permalink
fix request timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Nov 27, 2023
1 parent de24a7f commit d2b6714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ export class Runtime {
if (timeout > 0 && Number.isFinite(timeout)) {
timeoutId = setTimeout(()=>{
// reject if response wasn't already received (might still be processed, and resolve not yet called)
if (!this.callbacks_by_sid.get(unique_sid)?.[2]) reject(new NetworkError("DATEX request timeout after "+timeout+"ms: " + unique_sid + " to " + Runtime.valueToDatexString(to)));
reject(new NetworkError("DATEX request timeout after "+timeout+"ms: " + unique_sid + " to " + Runtime.valueToDatexString(to)));
}, timeout);
}
this.callbacks_by_sid.set(unique_sid, [resolve, reject, timeoutId]);
Expand Down

0 comments on commit d2b6714

Please sign in to comment.