From 642dd3f462e16b6d4f34e4857f960f927c996aa8 Mon Sep 17 00:00:00 2001 From: Phin <59180111+phin05@users.noreply.github.com> Date: Fri, 27 Apr 2018 11:33:25 +0530 Subject: [PATCH] Update discordRichPresencePlex.py --- discordRichPresencePlex.py | 137 ++++++++++++++++++++----------------- 1 file changed, 76 insertions(+), 61 deletions(-) diff --git a/discordRichPresencePlex.py b/discordRichPresencePlex.py index 9c6dab2..2aa5168 100644 --- a/discordRichPresencePlex.py +++ b/discordRichPresencePlex.py @@ -35,7 +35,6 @@ class discordRichPresence: self.pipeWriter = None self.process = None self.running = False - self.resetNext = False self.child = child async def read(self): @@ -43,8 +42,8 @@ class discordRichPresence: data = await self.pipeReader.read(1024) self.child.log("[READ] " + str(json.loads(data[8:].decode("utf-8")))) except Exception as e: - self.child.log("Error: " + str(e)) - self.resetNext = True + self.child.log("[READ] " + str(e)) + self.stop() def write(self, op, payload): payload = json.dumps(payload) @@ -52,14 +51,17 @@ class discordRichPresence: data = self.pipeWriter.write(struct.pack("