code: public void close() {
          if (connected) {
              try {
                  terminal.deactivate();
              }
              catch (Exception ex) {
                  logger.debug("Exception occurred while closing UDPMasterConnection", ex);
              }
              connected = false;
          }
      }
docs: Closes this <tt>UDPMasterConnection</tt>.