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

Framed::poll_ready flushes when buffer is full #409

Merged
merged 5 commits into from Nov 5, 2021

Conversation

brockelmore
Copy link
Contributor

@brockelmore brockelmore commented Nov 4, 2021

PR Type

Bug fix

PR Checklist

Check your PR fulfills the following:

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt

Overview

Before, a SinkWriteFuture wouldn't be woken up during a poll_ready call, if the buffer length was greater than the HW (high water mark). This fixes that by flushing the buffer if that is the case. It adds tests based on tokio's FramedWrite.

This is a non-breaking change.

Fixes actix/actix#431, fixes #406

@robjtede robjtede merged commit 2080f4c into actix:master Nov 5, 2021
@robjtede
Copy link
Member

robjtede commented Nov 5, 2021

actix-codec 0.4.1 is released with this fixed, should just be a cargo update to get it

@elpiel
Copy link

elpiel commented Nov 5, 2021

Awesome! Thanks for the fix @brockelmore !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Codec: Framed::poll_ready does not register waker Messages dropped silently when using SinkWrite
3 participants