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
This commit is contained in:
David Wilson 2019-01-29 17:17:57 +00:00
parent a18a083c94
commit 26c6c6d048
1 changed files with 2 additions and 1 deletions

View File

@ -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: