Skip to content

Give TCPInterface reconnect logic on write errors#901

Open
jerub wants to merge 1 commit intomeshtastic:masterfrom
jerub:tcp-interface-update
Open

Give TCPInterface reconnect logic on write errors#901
jerub wants to merge 1 commit intomeshtastic:masterfrom
jerub:tcp-interface-update

Conversation

@jerub
Copy link

@jerub jerub commented Feb 5, 2026

  • Moving to socket.sendall() is safer, as sendall will send the entire buffer, while send() would return the number of bytes sent and require being called multiple times if the buffer was full.
  • On exceptions: reconnect to the server.
  • On reconnection: make sure using a lock that there isn't a race between the readers and the writers triggering a reconnect.

 * Moving to socket.sendall() is safer, as sendall will send the entire
   buffer, while send() would return the number of bytes sent and
   require being called multiple times if the buffer was full.
 * On exceptions: reconnect to the server.
 * On reconnection: make sure using a lock that there isn't a race
   between the readers and the writers triggering a reconnect.
@CLAassistant
Copy link

CLAassistant commented Feb 5, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants