TCP connections lack timeout/keepalive configuration #70

Closed
opened 2026-07-20 17:14:37 +02:00 by TapTap · 0 comments
Owner

Description

The TCP client () and server connections do not configure:

  1. Connect timeout — blocks indefinitely if the server is unreachable (no / set before connect)
  2. TCP keepalive — idle connections will not detect peer disconnection (no )
  3. Socket timeout — / on sockets have no timeout, so a stuck network can block threads indefinitely

This means:

  • A client connecting to a non-responsive server will hang forever
  • A server with a client that disappears without closing the connection will keep the child process alive indefinitely
  • A network failure mid-transfer will cause an infinite hang in /

Location

Suggested Fix

Add socket timeout configuration:

These could be configurable options on the client/server command line.

Severity

Medium

Category

Enhancement

## Description The TCP client () and server connections do not configure: 1. **Connect timeout** — blocks indefinitely if the server is unreachable (no / set before connect) 2. **TCP keepalive** — idle connections will not detect peer disconnection (no ) 3. **Socket timeout** — / on sockets have no timeout, so a stuck network can block threads indefinitely This means: - A client connecting to a non-responsive server will hang forever - A server with a client that disappears without closing the connection will keep the child process alive indefinitely - A network failure mid-transfer will cause an infinite hang in / ## Location ## Suggested Fix Add socket timeout configuration: These could be configurable options on the client/server command line. ## Severity Medium ## Category Enhancement
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#70