code: public CompletableFuture<Void> close() {
      if (state.getState() == Session.State.EXPIRED)
        return CompletableFuture.completedFuture(null);
  
      CompletableFuture<Void> future = new CompletableFuture<>();
      context.executor().execute(() -> {
        if (keepAlive != null) {
          keepAlive.cancel();
          keepAlive = null;
        }
        unregister(future);
      });
      return future;
    }
docs: Closes the session manager.
  
  @return A completable future to be completed once the session manager is closed.