Skip to content

Commit

Permalink
DIRAPI-339: Fix NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
seelmann committed Apr 27, 2019
1 parent 2f74af7 commit 70588ac
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -686,7 +686,11 @@ public boolean connect() throws LdapException

if ( !isSecured )
{
Throwable cause = ( Throwable ) connectionFuture.getSession().getAttribute( EXCEPTION_KEY );
Throwable cause = connectionFuture.getException();
if ( cause == null && connectionFuture.getSession() != null )
{
cause = ( Throwable ) connectionFuture.getSession().getAttribute( EXCEPTION_KEY );
}
throw new LdapTlsHandshakeException( I18n.err( I18n.ERR_04120_TLS_HANDSHAKE_ERROR ), cause );
}
}
Expand Down

0 comments on commit 70588ac

Please sign in to comment.