-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.3.1.Final
-
None
SSL connections can cause socket leaks.
I can not say for sure if this is a bug in XNIO ssl code or the code that uses XNIO (JBoss Remoting, in this case). Looking at XNIO code it certianly seems like XNIO is the cause, but then again, looking at the code it is hard to understand why only some connections leak and not all.
In more detail:
It is possible that JsseSslStreamSinkConduit.terminateWrites does not call super.terminateWrites, if for some reason flush() returns false.
And it is certain taht JsseSslStreamSourceConduit.terminateReads never calls super.terminateReads when tls is set, because it does not even try to.
Attached is a patch that fixed socket leaks for me.