Default IRCBot.running to false, set to true at the top of .run()
This commit is contained in:
parent
76a2c66b3e
commit
ec733e200c
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,7 @@ class Bot(object):
|
||||||
self._timers = timers
|
self._timers = timers
|
||||||
|
|
||||||
self.start_time = time.time()
|
self.start_time = time.time()
|
||||||
self.running = True
|
self.running = False
|
||||||
self.servers = {}
|
self.servers = {}
|
||||||
|
|
||||||
self._event_queue = queue.Queue() # type: typing.Queue[TriggerEvent]
|
self._event_queue = queue.Queue() # type: typing.Queue[TriggerEvent]
|
||||||
|
@ -255,6 +255,7 @@ class Bot(object):
|
||||||
return thread
|
return thread
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self.running = True
|
||||||
self._read_thread = self._daemon_thread(
|
self._read_thread = self._daemon_thread(
|
||||||
lambda: self._loop_catch("read", self._read_loop))
|
lambda: self._loop_catch("read", self._read_loop))
|
||||||
self._write_thread = self._daemon_thread(
|
self._write_thread = self._daemon_thread(
|
||||||
|
|
Loading…
Reference in a new issue