Skip to content

Commit

Permalink
Channel.bytesBeforeUnwritable() is renamed to writableBytes() and isW…
Browse files Browse the repository at this point in the history
…ritable() is removed (#2351)

- netty/netty#12530
- Temporary build on CI with PR in sock-proxy
netty-contrib/socks-proxy#10
  • Loading branch information
violetagg committed Jul 4, 2022
1 parent 996954c commit e7bac7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/check_transport.yml
Expand Up @@ -68,8 +68,10 @@ jobs:
path: codec-extras
- uses: actions/checkout@v3
with:
repository: netty-contrib/socks-proxy
# TODO temporary https://github.com/netty-contrib/socks-proxy/pull/10
repository: violetagg/socks-proxy
path: socks-proxy
ref: pending-write-queue
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
Expand Down
Expand Up @@ -295,7 +295,7 @@ public void run() {
//"FutureReturnValueIgnored" this is deliberate
ctx.write(encodedMessage).addListener(this);

if (parent.predicate.test(sourceMessage) || !ctx.channel().isWritable() || readableBytes > ctx.channel().bytesBeforeUnwritable()) {
if (parent.predicate.test(sourceMessage) || readableBytes > ctx.channel().writableBytes()) {
needFlush = false;
ctx.flush();
}
Expand Down

0 comments on commit e7bac7b

Please sign in to comment.