I am seeing an odd behavior when using JmmDNS. If I add a ServiceListener too soon after initially getting the JmmDNS object from the factory, that listener never receives any updates. The required delay seems to be substantial, 1-3 seconds. I have gotten around this by creating a wrapper that delays the addition of any listeners that come in before the delay has elapsed.
Can't understand why this should be the case, but I've tested it by creating a series of listeners with sequential IDs that simply print out their own IDs whenever they receive any kind of notification, which are added sequentially after incremental delays. It is always the case that some subset of the listeners, 1 to n, don't receive updates, while the remainder, n+1 to N, all receive them. I assume that the delay is associated with initializing the network, but don't understand why listeners added before the initialization completes seem to be ignored.