aws-api/src/main/java/com/amplifyframework/api/aws/MutiAuthSubscriptionOperation.java [148:164]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public synchronized void cancel() {
        if (subscriptionId != null && !canceled.get()) {
            canceled.set(true);
            executorService.execute(() -> {
                try {
                    LOG.debug("Cancelling subscription: " + subscriptionId);
                    subscriptionEndpoint.releaseSubscription(subscriptionId);
                } catch (ApiException exception) {
                    onSubscriptionError.accept(exception);
                }
            });
        } else if (subscriptionFuture != null && subscriptionFuture.cancel(true)) {
            LOG.debug("Subscription attempt was canceled.");
        } else {
            LOG.debug("Nothing to cancel. Subscription not yet created, or already cancelled.");
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



aws-api/src/main/java/com/amplifyframework/api/aws/SubscriptionOperation.java [95:111]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public synchronized void cancel() {
        if (subscriptionId != null && !canceled.get()) {
            canceled.set(true);
            executorService.execute(() -> {
                try {
                    LOG.debug("Cancelling subscription: " + subscriptionId);
                    subscriptionEndpoint.releaseSubscription(subscriptionId);
                } catch (ApiException exception) {
                    onSubscriptionError.accept(exception);
                }
            });
        } else if (subscriptionFuture != null && subscriptionFuture.cancel(true)) {
            LOG.debug("Subscription attempt was canceled.");
        } else {
            LOG.debug("Nothing to cancel. Subscription not yet created, or already cancelled.");
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



