Skip to content

fix: enable TCP keepalive on the Network.framework bootstrap - #8

Merged
datlechin merged 1 commit into
tablepro-mainfrom
fix/niots-keepalive
Aug 9, 2026
Merged

datlechin merged 1 commit into
tablepro-mainfrom
fix/niots-keepalive

Conversation

@datlechin

Copy link
Copy Markdown
Member

makeBootstrap applies SO_KEEPALIVE only on the ClientBootstrap branch. On Apple platforms defaultEventLoopGroup is NIOTSEventLoopGroup.singleton, so NIOTSConnectionBootstrap is always chosen and keepalive is never enabled. That is the path both TablePro apps use.

TCP_NODELAY is deliberately not added: NIOTSConnectionBootstrap.init?(validatingGroup:) already appends it, verified by reading options back off a live connection.

Also sets the keepalive idle time to 60s. The system default is two hours, long enough for a NAT or firewall to drop an idle Oracle session first.

TCP_KEEPALIVE is Darwin only (Linux spells it TCP_KEEPIDLE), so it stays inside the existing #if canImport(Network) guard and the ClientBootstrap branch is untouched.

Verified by building TablePro's TableProOracleCore against this branch. Tracked in TableProApp/TablePro#2038.

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.

1 participant