libevent / libevent/libevent

client unexpectedly lost persistent connection

Open
#1,781 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
12k
Forks
3.5k
Avg merge
12h 55m
Merged PRs (30d)
6

Description

When the client set timeouts using following API:

    evhttp_connection_set_connect_timeout_tv(...);
    evhttp_connection_set_write_timeout_tv(...);
    evhttp_connection_set_read_timeout_tv(...);

Seems libevent does not stop EV_READ/EV_WRITE timer after last request done.
It cause idle connection drop unexpectedly if last request done and no new request send out within timeout periods.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the implementations of evhttp_connection_set_connect_timeout_tv, evhttp_connection_set_write_timeout_tv, and evhttp_connection_set_read_timeout_tv. Reproduce the idle persistent-connection case after the last request completes, then trace how EV_READ and EV_WRITE timers are managed. Done means the connection remains available when no new request is sent within the configured timeout periods.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.