Skip to content

When sending big enough data in one message, loudmouth gets blocked and disconnects #2

Description

@isbear

Order of events:

  1. You send big enough (for your internet channel) message to activate lm buffering.
  2. Loudmouth sends first portion of message and puts remaining part into buffer.
  3. Upon next call to socket writer, loudmouth will try to send all remaining data in one pass - i.e. it will stop only when socket will return error, EAGAIN will not cause it to break the loop and wait for next chance. This is one issue. Situation gets worse, because there's three places, where it should be fixed - plaintext connection (relatively easy), and two ssl engines.
  4. There I am not so sure, but such situation usually results in reconnect due to ping timeout. Maybe loudmouth should take into account buffering state, when estimating channel vitality. Ping requests get appended to the end of buffer, and until that message was sent, they will remain unsent...

P.S. An easy way to get busy enough channel - is to fill it with outgoing torrent traffic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions