private boolean disconnectDirectChannel(final Exception exception) {
    if (directChannel != null) {
      directChannel.disconnect(exception);
      return true;
    }
    return false;
  }
for mock testing this allows insertion of a DirectChannel mock
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionImpl.java