Set closed state before actually finishing cleaning up.
This commit is contained in:
parent
9885a946e1
commit
4160cd7d12
@ -425,6 +425,8 @@ class Client:
|
|||||||
if self.is_closed():
|
if self.is_closed():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self._closed.set()
|
||||||
|
|
||||||
for voice in list(self.voice_clients):
|
for voice in list(self.voice_clients):
|
||||||
try:
|
try:
|
||||||
yield from voice.disconnect()
|
yield from voice.disconnect()
|
||||||
@ -439,7 +441,6 @@ class Client:
|
|||||||
|
|
||||||
|
|
||||||
yield from self.http.close()
|
yield from self.http.close()
|
||||||
self._closed.set()
|
|
||||||
self._ready.clear()
|
self._ready.clear()
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user