Make sure we exit event loop when there's no servers left

This commit is contained in:
jesopo 2019-06-17 14:07:06 +01:00
parent dbe0b1f43b
commit 9121a868a8

View file

@ -271,6 +271,8 @@ class Bot(object):
while self.running or not self._event_queue.empty(): while self.running or not self._event_queue.empty():
if not self.servers: if not self.servers:
self._kill() self._kill()
self.log.warn("No servers, exiting")
continue
kill = False kill = False
item = self._event_queue.get(block=True, timeout=None) item = self._event_queue.get(block=True, timeout=None)