aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-05-13 20:24:45 -0400
committerRapptz <[email protected]>2016-05-13 20:24:45 -0400
commite66b2dce8811233e59b98a0abd6033dd05ff7395 (patch)
treed6a4c113210585586799f08991f107d7faf71b75
parentFix Member.colour to use the new algorithm for determining colour. (diff)
downloaddiscord.py-e66b2dce8811233e59b98a0abd6033dd05ff7395.tar.xz
discord.py-e66b2dce8811233e59b98a0abd6033dd05ff7395.zip
Rename threading internal variable conflict.
-rw-r--r--discord/gateway.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/gateway.py b/discord/gateway.py
index c3c00383..6261274d 100644
--- a/discord/gateway.py
+++ b/discord/gateway.py
@@ -59,10 +59,10 @@ class KeepAliveHandler(threading.Thread):
self.interval = interval
self.daemon = True
self.msg = 'Keeping websocket alive with sequence {0[d]}'
- self._stop = threading.Event()
+ self._stop_ev = threading.Event()
def run(self):
- while not self._stop.wait(self.interval):
+ while not self._stop_ev.wait(self.interval):
data = self.get_payload()
log.debug(self.msg.format(data))
coro = self.ws.send_as_json(data)
@@ -80,7 +80,7 @@ class KeepAliveHandler(threading.Thread):
}
def stop(self):
- self._stop.set()
+ self._stop_ev.set()
class VoiceKeepAliveHandler(KeepAliveHandler):
def __init__(self, *args, **kwargs):