equal
deleted
inserted
replaced
323 """called on server stop event to properly close opened sessions and |
323 """called on server stop event to properly close opened sessions and |
324 connections |
324 connections |
325 """ |
325 """ |
326 assert not self._shutting_down, 'already shutting down' |
326 assert not self._shutting_down, 'already shutting down' |
327 self._shutting_down = True |
327 self._shutting_down = True |
|
328 self.system_source.shutdown() |
328 if isinstance(self._looping_tasks, tuple): # if tasks have been started |
329 if isinstance(self._looping_tasks, tuple): # if tasks have been started |
329 for looptask in self._looping_tasks: |
330 for looptask in self._looping_tasks: |
330 self.info('canceling task %s...', looptask.name) |
331 self.info('canceling task %s...', looptask.name) |
331 looptask.cancel() |
332 looptask.cancel() |
332 looptask.join() |
333 looptask.join() |