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.
This commit is contained in:
@@ -113,16 +113,7 @@ AsyncEventHook {
|
|||||||
}
|
}
|
||||||
if si then
|
if si then
|
||||||
local node = si:get_associated_proxy ("node")
|
local node = si:get_associated_proxy ("node")
|
||||||
local client_id = node.properties["client.id"]
|
lutils.sendClientError(event, node, -32, error_msg)
|
||||||
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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user