code: public ChannelFuture leaveGroup(InetAddress multicastAddress,
                                      NetworkInterface networkInterface, InetAddress source) {
          if (DetectionUtil.javaVersion() < 7) {
              throw new UnsupportedOperationException();
          } else {
              if (multicastAddress == null) {
                  throw new NullPointerException("multicastAddress");
              }
  
              if (networkInterface == null) {
                  throw new NullPointerException("networkInterface");
              }
  
              synchronized (this) {
                  if (memberships != null) {
                      List<MembershipKey> keys = memberships.get(multicastAddress);
                      if (keys != null) {
                          Iterator<MembershipKey> keyIt = keys.iterator();
  
                          while (keyIt.hasNext()) {
                              MembershipKey key = keyIt.next();
                              if (networkInterface.equals(key.networkInterface())) {
                                  if (source == null && key.sourceAddress() == null ||
                                          source != null && source.equals(key.sourceAddress())) {
                                      key.drop();
                                      keyIt.remove();
                                  }
                              }
                          }
                          if (keys.isEmpty()) {
                              memberships.remove(multicastAddress);
                          }
                      }
                  }
              }
              return succeededFuture(this);
          }
      }
docs: Leave the specified multicast group at the specified interface using the specified source.