Skip to content

Commit

Permalink
fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Dec 13, 2021
1 parent c2c14da commit c91899e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions salt/transport/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ def close(self):
self._closing = True
self.io_loop.add_timeout(1, self.check_close)
return

# try:
# for msg_id in list(self.send_future_map):
# log.error("Closing before send future completed %r", msg_id)
Expand Down Expand Up @@ -681,8 +682,8 @@ def _stream_return(self):
unpacker = salt.utils.msgpack.Unpacker()
while not self._closing:
try:
#self._read_until_future = self._stream.read_bytes(4096, partial=True)
#wire_bytes = yield self._read_until_future
# self._read_until_future = self._stream.read_bytes(4096, partial=True)
# wire_bytes = yield self._read_until_future
wire_bytes = yield self._stream.read_bytes(4096, partial=True)
unpacker.feed(wire_bytes)
for framed_msg in unpacker:
Expand Down Expand Up @@ -717,13 +718,13 @@ def _stream_return(self):
if self.disconnect_callback:
self.disconnect_callback()
# if the last connect finished, then we need to make a new one
#if self._connecting_future.done():
# if self._connecting_future.done():
stream = self._stream
self._stream = None
stream.close()
yield self.connect()
#self._connecting_future = self.connect()
#yield self._connecting_future
# self._connecting_future = self.connect()
# yield self._connecting_future
except TypeError:
# This is an invalid transport
if "detect_mode" in self.opts:
Expand All @@ -747,9 +748,9 @@ def _stream_return(self):
stream.close()
yield self.connect()
# if the last connect finished, then we need to make a new one
#if self._connecting_future.done():
# if self._connecting_future.done():
# self._connecting_future = self.connect()
#yield self._connecting_future
# yield self._connecting_future
self._stream_return_running = False

def _message_id(self):
Expand Down

0 comments on commit c91899e

Please sign in to comment.