HTTPCLIENT-2386: Fix TLS handshake timeout handling#541
HTTPCLIENT-2386: Fix TLS handshake timeout handling#541arturobernalg wants to merge 1 commit intoapache:masterfrom
Conversation
- Use socketTimeout (not connectTimeout) as default TLS handshake timeout - Throw TlsHandshakeTimeoutException for handshake timeouts
|
|
||
| final SSLIOSession tlsSession = tlsSessionRef.get(); | ||
| if (tlsSession != null && !tlsSession.isHandshakeComplete()) { | ||
| throw new TlsHandshakeTimeoutException("TLS handshake timed out after " + timeout); |
There was a problem hiding this comment.
@arturobernalg
I think we should add a timeout only constructor and have the message in that constructor so it's normalized and not duplicated in each call site.
| handler.timeout(currentSession, timeout); | ||
| } | ||
|
|
||
|
|
|
@arturobernalg I do not think we need this. The root cause of the problem is HTTPCLIENT-2386. |
@ok2c This change is inspired by the discussion in mailing list thread: https://lists.apache.org/thread/11bzsrztjm9y2862wo3x5ysoo9s1f5f7. |
@arturobernalg I am aware. I wrote it. It would be an option if we had not found the cause of the issue. |
@ok2c 100% agree. Trying to fix the issues on the client meanwhile. |
8fb1d8e to
bf7d524
Compare
Fix TLS handshake timeout handling (HTTPCLIENT-2386)
Use socketTimeout for TLS handshake and add dedicated timeout exception.