diff --git a/mitogen/core.py b/mitogen/core.py index 7ceba02c..c94126a6 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -2473,7 +2473,8 @@ class Router(object): return 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: fire(context, 'disconnect') else: