From e0dc6fb7b438c68d2e8d579372d5f67592c5a5c1 Mon Sep 17 00:00:00 2001 From: stickman89 Date: Mon, 21 Dec 2020 02:04:25 +0000 Subject: [PATCH] Use expect_unbuffer for pairing process to avoid buffered output. --- .../resources/lib/nvhttp/pairingmanager/simplepairingmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py b/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py index fed16bf..9410f48 100644 --- a/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py +++ b/script.luna/resources/lib/nvhttp/pairingmanager/simplepairingmanager.py @@ -16,7 +16,7 @@ def __init__(self, crypto_provider): def pair(self, nvhttp, server_info, dialog): self.logger.info('[MoonlightHelper] - Attempting to pair host: ' + self.config_helper.host_ip) - pairing_proc = subprocess.Popen(["moonlight", "pair"], cwd="/storage/moonlight", env={'LD_LIBRARY_PATH': '/storage/moonlight'}, shell=False, stdout=subprocess.PIPE, preexec_fn=os.setsid) + pairing_proc = subprocess.Popen(["expect_unbuffer", "moonlight", "pair"], cwd="/storage/moonlight", env={'LD_LIBRARY_PATH': '/storage/moonlight'}, shell=False, stdout=subprocess.PIPE, preexec_fn=os.setsid) lines_iterator = iter(pairing_proc.stdout.readline, b"") pairing_thread = threading.Thread(target=self.loop_lines, args=(self.logger, lines_iterator, dialog))