if (debug > 1) { System.out.println("JmDNS probing #"+taskState); }
logger.finer("run() JmDNS probing #"+taskState);
        public void run() {            synchronized (ioLock) {                DNSOutgoing out = null;                try {                    // send probes for JmDNS itself                    if (state == taskState && task == this) {                        if (out == null) {                            out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);                        }                        out.addQuestion(new DNSQuestion(host.name, DNSConstants.TYPE_ANY, DNSConstants.CLASS_IN));                        out.addAuthorativeAnswer(host);                        advanceState();                    }                    // send probes for services                    // Defensively copy the services into a local list,                    // to prevent race conditions with methods registerService                    // and unregisterService.                    for (Iterator i=services.values().iterator(); i.hasNext(); ) {                        ServiceInfo info = (ServiceInfo) i.next();                                                if (info.getState() == taskState && info.task == this) {                            info.advanceState();                            if (out == null) {                                out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);                                out.addQuestion(new DNSQuestion(info.getQualifiedName(), DNSConstants.TYPE_ANY, DNSConstants.CLASS_IN));                            }                            out.addAuthorativeAnswer(new DNSRecord.Service(info.getQualifiedName(), DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL, info.priority, info.weight, info.port, host.name));                                                    }                    }                    if (out != null) {                        if (debug > 1) {                            System.out.println("JmDNS probing #"+taskState);                        }                        send(out);                    } else {                        // If we have nothing to send, another timer taskState ahead                        // of us has done the job for us. We can cancel.                        cancel();                        return;                    }                } catch (Throwable e) {                    e.printStackTrace();                    close();                }                                taskState = taskState.advance();                if (! taskState.isProbing()) {                    cancel();                                        new Announcer().start();                }            }        }