Skip to content

Better timeouts and disconnection detection #9

@stakach

Description

@stakach

Currently timeouts are naive. They don't take into account the if the data has been delivered or not.
With TCP connections we should have two timeouts: sending and response.

If a send fails then the connection is considered disconnected. This can take quite a long time, might even continue retrying until the buffer is full? (this is OS level behaviour)

So we could speed up the process:

  • If a send fails (we have a promise object) then the connection is considered disconnected
  • If a send has not completed in the request timeout window then we disconnect manually
  • We start the request timeout once the send has completed, not as we begin the send

This should lead to more consistent behaviour when a device crashes or a local switch goes down

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions