Skip to content

Response to interrupted request returned for next one, after timeout interrupts reading the socket #157

@DanielHeath

Description

@DanielHeath

In ruby-3.2.2/lib/ruby/3.2.0/net/http.rb line 1855, a request is written to the socket; on line 1862 the response is read from the socket.

However, if a Timeout::Error occurs before the response arrives, the response is not read from the socket.

If the client is re-used, this causes the next request to read the response from the interrupted request (since it's queued on the socket and nothing else has read it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions