improve more handling of errors when starting server

+ add shutdown method to server (and dispatcher)
This commit is contained in:
l_samenv
2021-04-08 10:21:44 +02:00
parent dec286460d
commit d3fc01689f
2 changed files with 33 additions and 16 deletions

View File

@ -82,6 +82,7 @@ class Dispatcher:
self._subscriptions = {}
self._lock = threading.RLock()
self.restart = srv.restart
self.shutdown = srv.shutdown
def broadcast_event(self, msg, reallyall=False):
"""broadcasts a msg to all active connections