-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
We encountered an issue with fjagepy where, when sending a message via transport. We think this happened when the modem was disconnected during a send operation and the offending line is here. Trace looked like this:
[action_agent-1] self.transport.send(datagram_req)
[action_agent-1] File "/usr/local/lib/python3.10/dist-packages/fjagepy/__init__.py", line 147, in send
[action_agent-1] self.owner.send(msg)
[action_agent-1] File "/usr/local/lib/python3.10/dist-packages/fjagepy/__init__.py", line 760, in send
[action_agent-1] self.socket.sendall((rq + '\n').encode())
[action_agent-1] BrokenPipeError: [Errno 32] Broken pipe
Looking at that code it appears it's using the standard Python socket.sendall() which says it will raise an Exception on error and return None on success. So perhaps a check here would be good before returning True so the user doesn't need to catch the underlying socket exceptions.
Reactions are currently unavailable