mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Rename threading internal variable conflict.
This commit is contained in:
parent
9077b4e319
commit
e66b2dce88
@ -59,10 +59,10 @@ class KeepAliveHandler(threading.Thread):
|
|||||||
self.interval = interval
|
self.interval = interval
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
self.msg = 'Keeping websocket alive with sequence {0[d]}'
|
self.msg = 'Keeping websocket alive with sequence {0[d]}'
|
||||||
self._stop = threading.Event()
|
self._stop_ev = threading.Event()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while not self._stop.wait(self.interval):
|
while not self._stop_ev.wait(self.interval):
|
||||||
data = self.get_payload()
|
data = self.get_payload()
|
||||||
log.debug(self.msg.format(data))
|
log.debug(self.msg.format(data))
|
||||||
coro = self.ws.send_as_json(data)
|
coro = self.ws.send_as_json(data)
|
||||||
@ -80,7 +80,7 @@ class KeepAliveHandler(threading.Thread):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self._stop.set()
|
self._stop_ev.set()
|
||||||
|
|
||||||
class VoiceKeepAliveHandler(KeepAliveHandler):
|
class VoiceKeepAliveHandler(KeepAliveHandler):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user