Skip to content

[BUG] HTTP Client TcpStream Has No Timeout - Requests Can Hang Indefinitely #74

@EnthusiasticTech

Description

@EnthusiasticTech

Project

vgrep

Description

The HTTP client uses raw TcpStream without setting read/write timeouts. If the server becomes unresponsive or a network issue occurs, client operations will block forever, hanging the CLI.

Error Message

Debug Logs

System Information

Bounty Version: 0.1.0
OS: Ubuntu 24.04 LTS
CPU: AMD EPYC-Genoa Processor (8 cores)
RAM: 15 GB

Screenshots

No response

Steps to Reproduce

  1. Start a search while the server is processing a heavy request
  2. Kill the server mid-request
  3. The client hangs indefinitely waiting for response

Expected Behavior

The TcpStream should have timeouts configured:

stream.set_read_timeout(Some(Duration::from_secs(30)))?;
stream.set_write_timeout(Some(Duration::from_secs(30)))?;

Actual Behavior

No timeouts configured - operations block indefinitely:

// src/server/client.rs lines 70-71
let mut stream = TcpStream::connect(host_port)
    .context("...")?;
// No set_read_timeout or set_write_timeout!

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvalidValid issuevgrep

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions