Skip to content

Commit

Permalink
Remove reconnect for read errors (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
MJohnson459 authored Aug 13, 2024
1 parent 3971dd3 commit ec85393
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions clients/rospy/src/rospy/impl/tcpros_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,22 +798,11 @@ def receive_loop(self, msgs_callback):
msgs = self.receive_once()
if not self.done and not is_shutdown():
msgs_callback(msgs, self)
else:
self._reconnect()

except TransportException as e:
# set socket to None so we reconnect
try:
if self.socket is not None:
try:
self.socket.shutdown()
except:
pass
finally:
self.socket.close()
except:
pass
self.socket = None
# A transport exception means the connection has been closed from the other side.
# Clean up our side.
self.close()

except DeserializationError as e:
#TODO: how should we handle reconnect in this case?
Expand Down

0 comments on commit ec85393

Please sign in to comment.