Skip to content

brontide+peer: configurable read timeouts #7493

Open
@Crypt-iQ

Description

@Crypt-iQ

If a connection is slow, then it's possible for lnd's read deadlines to be hit. Ideally we should allow the user to raise these deadlines in case they have slow connections. This interacts with the issue outlined in #5837 since we may read the header just fine and then close the connection when trying to read the body.

Relevant call-sites:

  • RecvActOne, RecvActTwo, RecvActThree in the brontide package
  • when reading the init message:
    case <-time.After(handshakeTimeout):
  • when calling ReadNextBody when peered with an implementation that doesn't use Nagle's algorithm to batch TCP packets:
    rawMsg, readErr := noiseConn.ReadNextBody(buf[:pktLen])

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2pCode related to the peer-to-peer behaviour

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions