code: public void cleanUp() {
      if (outSocket != null) {
        try {
          outSocket.close();
        } catch (Exception e) {
          LogLog.error("Could not close outSocket.", e);
        }
  
        outSocket = null;
      }
    }
docs: Close the UDP Socket and release the underlying
  connector thread if it has been created