[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paho-dev] Java client SSL session resumption
- From: Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Aug 2015 22:14:31 +0100
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0
a bug has been raised on the Java client:
describing how the method the Java client reads from the socket does not
allow the SSL session to be resumed:
"Paho uses a blocking read of the socket input stream with a very long (infinite?) socket timeout.
Due to this, in order to stop the receiver thread it has to forcibly close the socket while the thread is blocked on the read.
This causes the read to throw a SocketException which has the effect to also invalidate the SSL session."
The proposed solution is to have the socket read regularly timeout after
some interval so that stopping the receiver thread can be done after the
timeout has expired without having an exception thrown.
I have not verified the situation myself, but the traces verify the
conclusions. I find this solution unsatisfying in that we have to
choose a timeout interval and then the shutdown procedure cannot be
immediate every time.
Does anyone know definitively whether this situation occurs on all
JVMs? And, are there any different solutions? Some sort of signal to
interrupt the wait without causing a severe exception would be ideal.
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto