

def _on_target_disconnected(self, event):
    'Disconnected Event Handler\n\n    This unbound function will be later added as an event handler to a\n    dynamically created and registered client instance and used to process\n    Disconnected events of a connected client.\n    '
    channel = event.channels[0]
    sock = self._sockets[channel]
    self.fire(close(sock), 'source')
    del self._sockets[channel]
    del self._clients[sock]

dataset/ETHPy150Open circuits/circuits/examples/portforward.py _on_target_disconnected/original