private static void removeFromThreadConMap(
      final ConcurrentMap<DistributedMember, List<Connection>> cm, final DistributedMember stub,
      final Connection c) {
    if (cm != null) {
      List<Connection> al = cm.get(stub);
      if (al != null) {
        synchronized (al) {
          al.remove(c);
        }
      }
    }
  }
check to see if there are still any receiver threads for the given end-point
geode-core/src/main/java/org/apache/geode/internal/tcp/ConnectionTable.java