Commit 59ae2df2 authored by Antoine Millet's avatar Antoine Millet
Browse files

Renamed on_close by on_shutdown (New tunnel API)

parent 2972f219
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1068,14 +1068,14 @@ class CliClient(Client):
        :param tun: the tunnel of this client
        :param label: label of the tunnel to create
        """
        def cb_on_close(tun):
        def cb_on_shutdown(tun):
            # Call the default callback:
            tun.cb_default_on_close(tun)
            tun.cb_default_on_shutdown(tun)
            # Delete the tunnel from the current running tunnels:
            self.unregister_tunnel(tun.label)

        ctun = self.conn.create_tunnel(label=label, endpoint=tun.socket,
                                       on_close=cb_on_close)
                                       on_shutdown=cb_on_shutdown)
        self._tunnels[ctun.label] = (ttype, client, ctun, tun)
        return ctun