Handle TLS session upgrade failures
This commit is contained in:
parent
90c07f3490
commit
7d523e9113
|
@ -90,13 +90,18 @@ final class DefaultAsyncClientConnectionOperator implements AsyncClientConnectio
|
|||
public void completed(final IOSession session) {
|
||||
final DefaultManagedAsyncClientConnection connection = new DefaultManagedAsyncClientConnection(session);
|
||||
if (tlsStrategy != null) {
|
||||
tlsStrategy.upgrade(
|
||||
connection,
|
||||
host,
|
||||
session.getLocalAddress(),
|
||||
session.getRemoteAddress(),
|
||||
attachment,
|
||||
connectTimeout);
|
||||
try {
|
||||
tlsStrategy.upgrade(
|
||||
connection,
|
||||
host,
|
||||
session.getLocalAddress(),
|
||||
session.getRemoteAddress(),
|
||||
attachment,
|
||||
connectTimeout);
|
||||
} catch (final Exception ex) {
|
||||
future.failed(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
future.completed(connection);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue