Problem detecting exit of bonjour services

Anonymous
2012-09-04
2013-01-24
  • Anonymous - 2012-09-04

    I tried to list bonjour services using jmdns.list(). This works fine if the server on which service is hosted exits clean with a multicast message. But in case the service exits abruptly without sending a multicast message, the client continues to see it even though it doesn't really exist.

     
  • Anonymous - 2012-09-27

    This is a "normal" behavior with any crashing case.
    However you should call some methods on your application:
    unregisterAllServices();
    close();

    For forcing this on any case you should add a ShutdownHook thread…

    This isn't related directly to JmDNS and it's pretty logical.
    If done right service won't show once closed.

    But on a system crash (eg. SWOD/BSOD/PANIC/etc…) the service will be kept on the DNS cache for a while (as described by it's TTL which if I remember is about 1hour for standard JmDNS broadcast).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks