code: private void closeChannel() {
          if (this.channel != null) {
              if (this.channel.isConnected()) {
                  try {
                      this.channel.disconnect();
                  } catch (IOException e) {
                      logger.warn(e.getMessage(), e);
                  }
              }
  
              if (this.channel.isOpen()) {
                  try {
                      this.channel.close();
                  } catch (IOException e) {
                      logger.warn(e.getMessage(), e);
                  }
              }
          }
      }
docs: Disconnects and closes the datagram channel used to send and receive RTCP traffic.