mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
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:
parent
3f0287c1e6
commit
793cf69e8f
@ -340,7 +340,7 @@ sub Write
|
|||||||
return if IsDisabled($name);
|
return if IsDisabled($name);
|
||||||
|
|
||||||
my $dev = shift // return; # Logical device 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 $id = "$dev:$method:" . (++$hash->{lastid});
|
||||||
my $rpcparam;
|
my $rpcparam;
|
||||||
|
|
||||||
@ -432,7 +432,10 @@ sub Write
|
|||||||
|
|
||||||
Log3($name, 5, "UBUS ($name) - sent: $json");
|
Log3($name, 5, "UBUS ($name) - sent: $json");
|
||||||
|
|
||||||
$hash->{rpc}{$id} = $request;
|
if($dev eq $name)
|
||||||
|
{
|
||||||
|
$hash->{rpc}{$id} = $request;
|
||||||
|
}
|
||||||
|
|
||||||
if($hash->{method} eq 'websocket')
|
if($hash->{method} eq 'websocket')
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user