FastSync has no configurable timeouts for any network operations:
1. **`src/shared/transport_tcp.c`**: No `setsockopt(SO_RCVTIMEO)` or `setsockopt(SO_SNDTIMEO)` is set on sockets. `connect()` has no timeout wrapper.
2. **`src/shared/transport_ssh.c`**: The `read()` on the exec pipe (line 135) has no timeout.
3. **`src/shared/protocol.c`**: All `read()`/`write()` calls can block indefinitely.
4. **`src/server/server.c`**: `accept()` blocks without timeout.
This means:
- If the remote server disappears mid-transfer, the client hangs forever
- If network partitions occur, file descriptors are never released
- A malicious server can hold client connections open indefinitely (DoS)
- No `--timeout` or `--contimeout` CLI options exist (unlike rsync)
**Suggested Fix:**
1. Add SO_RCVTIMEO/SO_SNDTIMEO to client sockets
2. Add connect timeout via `O_NONBLOCK` + `select()`/`poll()`
3. Add `--timeout` CLI option with default (e.g., 0 = no timeout, like rsync)
**Location:** `src/shared/transport_tcp.c`, `src/shared/protocol.c`, `src/server/server.c`
**Severity:** medium
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
FastSync has no configurable timeouts for any network operations:
src/shared/transport_tcp.c: Nosetsockopt(SO_RCVTIMEO)orsetsockopt(SO_SNDTIMEO)is set on sockets.connect()has no timeout wrapper.src/shared/transport_ssh.c: Theread()on the exec pipe (line 135) has no timeout.src/shared/protocol.c: Allread()/write()calls can block indefinitely.src/server/server.c:accept()blocks without timeout.This means:
--timeoutor--contimeoutCLI options exist (unlike rsync)Suggested Fix:
O_NONBLOCK+select()/poll()--timeoutCLI option with default (e.g., 0 = no timeout, like rsync)Location:
src/shared/transport_tcp.c,src/shared/protocol.c,src/server/server.cSeverity: medium