Skip to content

Commit

Permalink
skip pointer updates when endpoint is local
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Feb 11, 2024
1 parent c94d47e commit 2b380a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/pointers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4226,6 +4226,12 @@ export class Pointer<T = any> extends Ref<T> {
// if identifier is set, further updates to the same identifier are overwritten
async handleDatexUpdate(identifier:string|null, datex:string|PrecompiledDXB, data:any[], receiver:endpoints, collapse_first_inserted = false, stream_abort_signal?: AbortSignal){

// cannot send updates as @@local
if (Runtime.endpoint == LOCAL_ENDPOINT) {
logger.warn("Skipped DATEX update " + this.idString() + " (" + identifier + ")" + " to " + receiver + ", own endpoint is @@local");
return;
}

// let schedulter handle updates (cannot throw errors)
if (this.#scheduler) {
this.#scheduler.addUpdate(this, identifier, datex, data, receiver, collapse_first_inserted);
Expand Down

0 comments on commit 2b380a5

Please sign in to comment.