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

Channel.write future not called when SslHandler is used #1464

Closed
scramjet opened this issue Jun 18, 2013 · 6 comments
Closed

Channel.write future not called when SslHandler is used #1464

scramjet opened this issue Jun 18, 2013 · 6 comments
Assignees
Labels
Milestone

Comments

@scramjet
Copy link

I have some code that was previously working in 4.0.0.CR1, that I've ported to CR5. The code relies on standard "send and close" logic like:

channel.write (message).addListener (ChannelFutureListener.CLOSE);

This has started failing in CR5 (the listener is never called), but only when SslHandler is at the top of the stack. Removing SSL, but keeping everything else the same fixes the issue.

It may or may not be relevant that I'm also using a MessageToMessage codec, which I see has been the subject of bad interactions with SSL before (issue #1222).

Any ideas?

@masarlabs
Copy link

I have the same identical problem.

ch.write("Client is closing").sync();

never returns.
If remove SSL all works.

@masarlabs
Copy link

I did some test and also the sample SecureChatClient does not work.

Start the secure chat server: java -cp netty-all-4.0.0.CR5.jar:../netty-example-4.0.0.CR5.jar io.netty.example.securechat.SecureChatServer

Start the client: java -cp netty-all-4.0.0.CR5.jar:../netty-example-4.0.0.CR5.jar io.netty.example.securechat.SecureChatClient localhost 8443

type: bye

Client is blocked.
jconsole shows:

Name: main
State: WAITING on io.netty.channel.DefaultChannelPromise@181b9dd
Total blocked: 2 Total waited: 3

Stack trace:
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:503)
io.netty.util.concurrent.DefaultPromise.await(DefaultPromise.java:239)
io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:129)
io.netty.channel.DefaultChannelPromise.await(DefaultChannelPromise.java:28)
io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:203)
io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:117)
io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:28)
io.netty.example.securechat.SecureChatClient.run(SecureChatClient.java:75)
io.netty.example.securechat.SecureChatClient.main(SecureChatClient.java:96)

@normanmaurer
Copy link
Member

@scramjet @masarlabs I just pushed a fix... Can you retry with latest master ?

@masarlabs
Copy link

Now it works.
Thanks.

@scramjet
Copy link
Author

All good here now too.

Thanks for the quick fix!

@normanmaurer
Copy link
Member

Thanks for confirm the fix :)

Am 21.06.2013 um 08:58 schrieb Matthew notifications@github.com:

All good here now too.

Thanks for the quick fix!


Reply to this email directly or view it on GitHub.

hackmann pushed a commit to hackmann/netty that referenced this issue Jan 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants