Details TBD but something like:
1) in send([*cmds]) have a try/catch on the actual send to socket.
2) If there is a broken pipe, call reconnect and resend that command
3) If reconnecting fails return a hardware communication error
4) If reconnecting works, continue as usual
Details TBD but something like: 1) in send([*cmds]) have a try/catch on the actual send to socket. 2) If there is a broken pipe, call reconnect and resend that command 3) If reconnecting fails return a hardware communication error 4) If reconnecting works, continue as usual