Commit d4ca67c4 authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed bug with on_close argument

parent 95879192
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ class TunnelProtocol(Protocol):
    def __init__(self, *args, **kwargs):
        endpoint = kwargs.pop('endpoint', None)
        autostart = kwargs.pop('autostart', True)
        self._cb_on_close = kwargs.pop('on_close', self.cb_default_on_close)
        super(TunnelProtocol, self).__init__(*args, **kwargs)

        if endpoint is None:
@@ -27,7 +28,6 @@ class TunnelProtocol(Protocol):
            self._endpoint = endpoint
            self._socket = None

        self._cb_on_close = kwargs.pop('on_close', self.cb_default_on_close)

        self._is_closed = False
        self._is_started = autostart