-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
First, thanks so much for creating the library, it's really useful. I am using this via gottox/socket-io (client) and have run into this nasty problem of an endless loop in SSLSocketChannel2.java when closing a connection (maybe after the other side closed first). A couple of these failures is all it takes to pin the CPU at 100% as the threads that execute these loops pile up.
I doubt this is the correct fix, but what I did was change the following in SSLSocketChannel2.readRemaining(), which seems to work.
if( inCrypt.hasRemaining() ) {
unwrap();
int amount = transfereTo( inData, dst );
>>> if (engineStatus == SSLEngineResult.Status.CLOSED) {
>>> return -1;
>>> }
if( amount > 0 )
return amount;
}EDIT by @Davidisudadi: formatted code