From f9dd46dfd45adb2fc63eec765dcdcccf9bbab969 Mon Sep 17 00:00:00 2001 From: ShadowEO Date: Tue, 31 May 2016 16:11:11 -0400 Subject: [PATCH] trying again. --- lib/modules/InputDeviceServices/InputDeviceServices.API.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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");