72_UBUS_CLIENT.pm: fixed memory leak, remember only own RPCs

git-svn-id: https://svn.fhem.de/fhem/trunk@28015 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
xenos1984
2023-10-01 14:03:43 +00:00
parent 9c481b9edc
commit d5fa8f3060

View File

@@ -340,7 +340,7 @@ sub Write
return if IsDisabled($name);
my $dev = shift // return; # Logical device name
my $method = shift // q{}; # Mehod (list, call, subscribe...)
my $method = shift // q{}; # Method (list, call, subscribe...)
my $id = "$dev:$method:" . (++$hash->{lastid});
my $rpcparam;
@@ -432,7 +432,10 @@ sub Write
Log3($name, 5, "UBUS ($name) - sent: $json");
$hash->{rpc}{$id} = $request;
if($dev eq $name)
{
$hash->{rpc}{$id} = $request;
}
if($hash->{method} eq 'websocket')
{