Loading sjrpc/core/protocols/tunnel.py +4 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class TunnelProtocol(Protocol): self._socket = None self._is_shutdown = threading.Event() self._is_started = autostart self._is_started = False self._from_tun_to_endpoint_buf = '' self._asked = 0 # Data asked to the peer self._ok_to_send = 0 # Data I can send to the peer Loading @@ -46,8 +46,8 @@ class TunnelProtocol(Protocol): callback=self._handle_from_tunnel) self._endpoint_writer = self.create_watcher(pyev.Io, **props) self._connection.rpc.send_special('protoctl', label=self._label, type='ready') if autostart: self.start() def _handle_from_endpoint(self, watcher, revents): """ Handle data coming from the endpoint socket and push it through the Loading Loading @@ -130,6 +130,7 @@ class TunnelProtocol(Protocol): """ Start the reader on the endpoint. """ if not self._is_shutdown.is_set(): self._connection.rpc.send_special('protoctl', label=self._label, type='ready') self._is_started = True self._endpoint_reader.start() Loading Loading
sjrpc/core/protocols/tunnel.py +4 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class TunnelProtocol(Protocol): self._socket = None self._is_shutdown = threading.Event() self._is_started = autostart self._is_started = False self._from_tun_to_endpoint_buf = '' self._asked = 0 # Data asked to the peer self._ok_to_send = 0 # Data I can send to the peer Loading @@ -46,8 +46,8 @@ class TunnelProtocol(Protocol): callback=self._handle_from_tunnel) self._endpoint_writer = self.create_watcher(pyev.Io, **props) self._connection.rpc.send_special('protoctl', label=self._label, type='ready') if autostart: self.start() def _handle_from_endpoint(self, watcher, revents): """ Handle data coming from the endpoint socket and push it through the Loading Loading @@ -130,6 +130,7 @@ class TunnelProtocol(Protocol): """ Start the reader on the endpoint. """ if not self._is_shutdown.is_set(): self._connection.rpc.send_special('protoctl', label=self._label, type='ready') self._is_started = True self._endpoint_reader.start() Loading