issue #413: don't double-propagate DEL_ROUTE to parent.

propagate_up() sends ADD_ROUTE and DEL_ROUTE

propagate_down() sends only DEL_ROUTE, but didn't bother checking if
up() had sent it already.

Fixes:

     ERROR! [pid 41060] 17:55:30.739159 E mitogen.ctx.ssh.localhost:
     mitogen: RouteMonitor(): received DEL_ROUTE for 6081 from
     mitogen.fork.Stream(u'fork.41142'), expected
     mitogen.core.Stream('parent')
issue510
David Wilson 6 years ago
parent e2478dcb9f
commit 9aa845669c

@ -1780,7 +1780,10 @@ class RouteMonitor(object):
ID of the connecting or disconnecting context. ID of the connecting or disconnecting context.
""" """
for stream in self.router.get_streams(): for stream in self.router.get_streams():
if target_id in stream.egress_ids: if target_id in stream.egress_ids and (
(self.parent is None) or
(self.parent.context_id != stream.remote_id)
):
self._send_one(stream, mitogen.core.DEL_ROUTE, target_id, None) self._send_one(stream, mitogen.core.DEL_ROUTE, target_id, None)
def notice_stream(self, stream): def notice_stream(self, stream):

Loading…
Cancel
Save