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

EmbeddedChannel: make write not auto-flush & websockets: connection closed frame must be flushed #421

Merged
merged 2 commits into from
May 21, 2018

Commits on May 21, 2018

  1. EmbeddedChannel: make write not auto-flush

    Motivation:
    
    EmbeddedChannel just treated all `write`s as flushed. That's not a good
    idea as all real channels obviously only actually write the bytes when
    flushed. This changes that behaviour for `EmbeddedChannel`.
    
    Modifications:
    
    - make `write` only write to a buffer
    - make `flush` then actually pretend to write the bytes
    
    Result:
    
    - EmbeddedChannel behaves more realisticly
    weissi committed May 21, 2018
    Configuration menu
    Copy the full SHA
    2ea4281 View commit details
    Browse the repository at this point in the history
  2. websockets: connection closed frame must be flushed

    Motivation:
    
    Because EmbeddedChannel used to treat all writes as flushed the test
    that tested that we do send out the WebSockets connection close frame
    didn't actually test the right thing. Now that EmbeddedChannel behaves
    more realisticly, this test actually fails.
    
    This fixes the bug and the test that tests that a WebSockets connection
    is successfully torn down after an error occured.
    
    Modifications:
    
    - use `writeAndFlush` to send out the connection close frame.
    
    Result:
    
    WebSockets connection actually gets closed on error.
    weissi committed May 21, 2018
    Configuration menu
    Copy the full SHA
    9a49ecb View commit details
    Browse the repository at this point in the history