proper shutdown of receiver listeners

This commit is contained in:
Daniel Pavel 2013-06-16 17:06:16 +02:00
parent 687e1be3e5
commit bde54aba3b
1 changed files with 7 additions and 5 deletions

View File

@ -218,11 +218,13 @@ def stop_all():
listeners = list(_all_listeners.values())
_all_listeners.clear()
for l in listeners:
if l:
l.stop()
for l in listeners:
if l:
if listeners:
_log.info("stopping %s", listeners)
for l in listeners:
if l:
l.stop()
for l in listeners:
l.join()