Project
vgrep
Description
The HTTP client uses TcpStream::connect() without setting a timeout, causing the CLI to hang indefinitely if the server is unresponsive.
Error Observation
When the vgrep server is unreachable, the CLI hangs with no feedback for the OS default timeout (often 2+ minutes on Linux).
Error Message
Debug Logs
System Information
Version: 0.1.0
## Operating System
OS: Ubuntu 24.04.3 LTS
Kernel: 6.8.0-79-generic
Arch: x86_64
## Hardware
CPU: AMD Ryzen 9 5950X 16-Core Processor (4 cores)
RAM: 11 GB
## Build Environment
Rust: rustc 1.92.0 (ded5c06cf 2025-12-08)
Target: x86_64
Screenshots
No response
Steps to Reproduce
- Don't start the vgrep server
- Run a vgrep CLI command that requires the server
- Observe the CLI hangs with no feedback
Code in src/server/client.rs lines 70, 118, 161:
let mut stream = TcpStream::connect(host_port)
.context("Failed to connect to vgrep server")?;
### Expected Behavior
Should set a reasonable connection timeout (e.g., 5 seconds).
### Actual Behavior
CLI hangs for the OS default TCP timeout with no feedback to the user.
### Additional Context
Poor user experience when server is not running. Issue appears at 3 locations.
Project
vgrep
Description
The HTTP client uses
TcpStream::connect()without setting a timeout, causing the CLI to hang indefinitely if the server is unresponsive.Error Observation
When the vgrep server is unreachable, the CLI hangs with no feedback for the OS default timeout (often 2+ minutes on Linux).
Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
Code in
src/server/client.rslines 70, 118, 161: