only _kill() when there's no servers *and* the event queue is empty

this is so that bitbot doesn't exit when you !reconnect but only have 1 server
This commit is contained in:
jesopo 2019-09-30 11:52:07 +01:00
parent 1d34363db4
commit 8480309db2

View file

@ -273,7 +273,7 @@ class Bot(object):
def _event_loop(self):
while self.running or not self._event_queue.empty():
if not self.servers:
if not self.servers and self._event_queue.empty():
self._kill()
self.log.warn("No servers, exiting")
break