Skip to content

Commit

Permalink
Close connection after TLS timeout or error
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Lei <[email protected]>
  • Loading branch information
alei121 authored and jansupol committed May 7, 2020
1 parent f393e93 commit 597e6c6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,10 @@ public void handleTimeout() {
try {
sslHandshakeFuture.get(timeoutMs, TimeUnit.MILLISECONDS);
} catch (ExecutionException e) {
closeTransport(privateTransport);
throw new DeploymentException("SSL handshake has failed", e.getCause());
} catch (Exception e) {
closeTransport(privateTransport);
throw new DeploymentException(String.format("Connection to '%s' failed.", requestURI),
e.getCause());
}
Expand Down

0 comments on commit 597e6c6

Please sign in to comment.