driver-async/src/main/com/mongodb/async/client/ClientSessionImpl.java
@Override
    public void close() {
        if (transactionState == TransactionState.IN) {
            abortTransaction(new SingleResultCallback<Void>() {
                @Override
                public void onResult(final Void result, final Throwable t) {
                    ClientSessionImpl.super.close();
                }
            });
        } else {
            super.close();
        }
    }
@Override
    public void close() {
        if (transactionState == TransactionState.IN) {
            abortTransaction(new SingleResultCallback<Void>() {
                @Override
                public void onResult(final Void result, final Throwable t) {
                    ClientSessionImpl.super.close();
                }
            });
        } else {
            super.close();
        }
    }
@ Override public void close ( ) { if ( transactionState == TransactionState . IN ) { abortTransaction ( new SingleResultCallback < Void > ( ) { @ Override public void onResult ( final Void result , final Throwable t ) { ClientSessionImpl . super . close ( ) ; } } ) ; } else { super . close ( ) ; } }
TODO: should there be a version of this that takes a callback?
TODO : should there be a version of this that takes a callback?