Skip to content

Give TCPInterface reconnect logic on write errors#901

Merged
ianmcorvidae merged 1 commit into
meshtastic:masterfrom
jerub:tcp-interface-update
May 31, 2026
Merged

Give TCPInterface reconnect logic on write errors#901
ianmcorvidae merged 1 commit into
meshtastic:masterfrom
jerub:tcp-interface-update

Conversation

@jerub
Copy link
Copy Markdown
Contributor

@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
Copy Markdown

CLAassistant commented Feb 5, 2026

CLA assistant check
All committers have signed the CLA.

@ianmcorvidae ianmcorvidae merged commit 07172f8 into meshtastic:master May 31, 2026
1 check passed
@ianmcorvidae
Copy link
Copy Markdown
Contributor

Hi there, sorry for taking so long to get to this. I'm working on integrating this locally to deal with the merge conflicts and the errant commit of changes to the protobufs submodule. Thanks for the contribution!

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.

3 participants