issue #498: fix shutdown crash

Traceback (most recent call last):
      File "<stdin>", line 2707, in _invoke
      File "<stdin>", line 2480, in _on_del_route
    NameError: global name 'target_id' is not defined
issue510
David Wilson 6 years ago
parent a18a083c94
commit 26c6c6d048

@ -2473,7 +2473,8 @@ class Router(object):
return return
target_id_s, _, name = bytes_partition(msg.data, b(':')) target_id_s, _, name = bytes_partition(msg.data, b(':'))
context = self._context_by_id.get(int(target_id_s, 10)) target_id = int(target_id_s, 10)
context = self._context_by_id.get(target_id)
if context: if context:
fire(context, 'disconnect') fire(context, 'disconnect')
else: else:

Loading…
Cancel
Save