From 3ffd0956d4d83a860ba3c7256dbb401567835ef0 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 25 Mar 2024 13:44:45 +0100 Subject: [PATCH] linking: Use sendClientError in link-error handler The current code was not updated to use `clients_om`, thus never found a client, ending up never sending client errors. Just use the shared helper to avoid such issues in the future. --- src/scripts/linking/link-target.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/scripts/linking/link-target.lua b/src/scripts/linking/link-target.lua index d0f7a6b1..62be86ce 100644 --- a/src/scripts/linking/link-target.lua +++ b/src/scripts/linking/link-target.lua @@ -113,16 +113,7 @@ AsyncEventHook { } if si then local node = si:get_associated_proxy ("node") - local client_id = node.properties["client.id"] - if client_id then - local client = om:lookup { - Constraint { "bound-id", "=", client_id, type = "gobject" } - } - if client then - log:info (node, "sending client error: " .. error_msg) - client:send_error (node["bound-id"], -32, error_msg) - end - end + lutils.sendClientError(event, node, -32, error_msg) end end end)