Skip to content

Commit

Permalink
Use expect_unbuffer for pairing process to avoid buffered output.
Browse files Browse the repository at this point in the history
  • Loading branch information
stickman89 committed Dec 21, 2020
1 parent e497324 commit e0dc6fb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit e0dc6fb

Please sign in to comment.