Skip to content

Commit

Permalink
Disconnect the session after SSL handshake issue
Browse files Browse the repository at this point in the history
When the handshake check that is added in PR #17 fails, then a
ClientConnectionException is thrown, and passed up to the client in
ovirt-engine.
But as the connection is in some invalid state, but not disconnected, it
for example causes there are no heartbeats anymore.

This fix also closes the connection when there is some
ClientConnectionException in the postConnect stage.

This should fix #27

Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
  • Loading branch information
dupondje authored and sandrobonazzola committed May 19, 2023
1 parent 3ac3ca2 commit 9776cd4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void connect() throws ClientConnectionException {
this.closing.set(false);
clean();
postConnect(getPostConnectCallback());
} catch (InterruptedException | ExecutionException e) {
} catch (ClientConnectionException | InterruptedException | ExecutionException e) {
logException(log, "Exception during connection", e);
final String message = "Connection issue " + ExceptionUtils.getRootCause(e).getMessage();
scheduleClose(message);
Expand Down

0 comments on commit 9776cd4

Please sign in to comment.