Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect ping/pong flow-control abilities properly #9642

Closed

Commits on Jul 16, 2018

  1. ws: Fix missing chain up of prepare vfunc

    In the CockpitChannelResponse implementation we need to call
    the base class prepare virtual function from the overridden one.
    stefwalter committed Jul 16, 2018
    Configuration menu
    Copy the full SHA
    306c94b View commit details
    Browse the repository at this point in the history
  2. Detect ping/pong flow-control abilities properly

    There is a rare situation, where cockpit-ws is of an older version
    than a cockpit-bridge/cockpit.js pair (always shipped in same package).
    
    In this situation, if flow control is used for a data heavy sideband
    channel, there is the likelyhood that the channel will slow and
    hang due to flow control. This is because cockpit-ws is not new
    enough to know to respond to "ping" messages with "pong" messages.
    
    To combat this, we expect to first see a "ping" message in a channel
    before throttling senders for that channel. To facilitate this we
    send a "ping" message as one of the first control messages in a
    channel.
    
    We still follow the general mechanism of sending a "ping" message
    every N sequence bytes ... it's just now that we also do that when
    N == 0.
    
    This is a very small code change, with a very big change to the tests.
    In order to facilitate backporting these patches I have stayed away
    from refactoring the tests.
    stefwalter committed Jul 16, 2018
    Configuration menu
    Copy the full SHA
    7994a64 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7c42414 View commit details
    Browse the repository at this point in the history