diff --git a/lib/modules/InputDeviceServices/InputDeviceServices.API.php b/lib/modules/InputDeviceServices/InputDeviceServices.API.php index 79b3ab6..f4ab09f 100644 --- a/lib/modules/InputDeviceServices/InputDeviceServices.API.php +++ b/lib/modules/InputDeviceServices/InputDeviceServices.API.php @@ -154,8 +154,9 @@ class InputDeviceServices { $input_client = new React\SocketClient\Connector($loop, $dns); $input_client->create($IP, $PORT)->then(function (React\Stream\Stream $stream) use ($IP, $PORT) { LogEcho("Connected to event server on: ".$IP. ":". $PORT,"INPUTC"); - global $stream; - $stream = $stream; + + $GLOBALS['stream'] = &$stream; + $stream->on('data', function($data) { global $input_client_process; #if(defined("DEBUG")) LogEcho($data, "INPUTC");