Missing --timeout / --contimeout CLI flags for connection and I/O timeouts #95

Closed
opened 2026-07-21 16:19:49 +02:00 by TapTap · 1 comment
Owner

Description

FastSync has no command-line flag to set I/O or connection timeouts. The socket timeout is hardcoded to 30 seconds in transport_tcp.c:19 (set_socket_timeouts()). Users working with slow networks or large transfers need finer control:

  • --timeout <sec> for I/O operations (read/write)
  • --contimeout <sec> for connection establishment

Location

  • src/client/client_cli.c (needs flag parsing)
  • src/shared/transport_tcp.c:17-36 (hardcoded 30s timeout)
  • src/shared/config.h (needs new Config fields)

Suggested Fix

Add timeout_sec (default 30) and contimeout_sec (default 10) fields to the Config struct. Parse --timeout and --contimeout in client_cli.c. Pass values to set_socket_timeouts() and client_connect().

Severity

medium

Category

feature

Sub-Agent

feature-scout (FS-1)


This issue was automatically generated by the issue-creator agent.

## Description FastSync has no command-line flag to set I/O or connection timeouts. The socket timeout is hardcoded to 30 seconds in `transport_tcp.c:19` (`set_socket_timeouts()`). Users working with slow networks or large transfers need finer control: - `--timeout <sec>` for I/O operations (read/write) - `--contimeout <sec>` for connection establishment ## Location - src/client/client_cli.c (needs flag parsing) - src/shared/transport_tcp.c:17-36 (hardcoded 30s timeout) - src/shared/config.h (needs new Config fields) ## Suggested Fix Add `timeout_sec` (default 30) and `contimeout_sec` (default 10) fields to the `Config` struct. Parse `--timeout` and `--contimeout` in `client_cli.c`. Pass values to `set_socket_timeouts()` and `client_connect()`. ## Severity medium ## Category feature ## Sub-Agent feature-scout (FS-1) --- _This issue was automatically generated by the issue-creator agent._
Author
Owner

Fixed in PR #148 — merged into main on 2026-07-29.

Fixed in PR #148 — merged into main on 2026-07-29.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#95