Skip to content

Commit

Permalink
Raise if unable to reset at start of send
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJKoopman committed Oct 7, 2024
1 parent df58707 commit 2eb2c83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions socs/tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ def send(self, msg):
"""
if self.comm is None:
print("Connection not established. Unable to send command.")
print("Connection not established.")
self._reset()
return
if self.comm is None:
raise ConnectionError("Unable to establish connection.")

try:
self.comm.sendall(msg)
Expand Down

0 comments on commit 2eb2c83

Please sign in to comment.