Skip to content

Optionally (on by default) enable TCP keepalive - #74

Merged
garethpotter merged 5 commits into
mainfrom
socket-server-keepalive-and-slot-leak
Nov 3, 2026
Merged

garethpotter merged 5 commits into
mainfrom
socket-server-keepalive-and-slot-leak

Conversation

@amitchone

@amitchone amitchone commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Addresses an issue whereby the failure of a client to properly close a TCP connection will (eventually) cause the TCP server to silently stop accepting new connections - if a TCP connection is open and then no Finish packet is sent, the server would never free the slot and eventually the number of free slots will drop to zero with no warning or error raised

The keepalive mechanism probes (a configurable number of times) for clients that are silent (after a configurable timeout) and will close them after enough failed probe attempts, thus freeing the slot

Also bypasses this Zephyr CMake issue until we bump the Zephyr version with which we build

@amitchone amitchone changed the title Optionally (on by defualt) enable TCP keepalive Optionally (on by default) enable TCP keepalive Nov 3, 2026
@garethpotter

Copy link
Copy Markdown
Collaborator

My usual question: a little bit of context on why we might want this?

@amitchone

Copy link
Copy Markdown
Collaborator Author

My usual question: a little bit of context on why we might want this?

A fair question indeed, I've updated the description with a brief overview

@garethpotter garethpotter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@garethpotter
garethpotter merged commit 955bb9e into main Nov 3, 2026
6 checks passed
@amitchone

Copy link
Copy Markdown
Collaborator Author

Looks good.

Appreciate you taking the time to look as always!

@garethpotter

Copy link
Copy Markdown
Collaborator

Has Matt told you about ThingSetClassic?

@amitchone

Copy link
Copy Markdown
Collaborator Author

Has Matt told you about ThingSetClassic?

He has now, oh my gosh 😆 There has to be a huge market for this

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