public void closeIfNecessary(){
  if (jmdnsInstance != null) {
    if (jmdnsSubscriberCount.get() <= 0) {
      close();
    }
  }
}

public void closeIfNecessary ( ) { if ( jmdnsInstance != null ) { if ( jmdnsSubscriberCount . get ( ) <= 0 ) { close ( ) ; } } }
closes the jmdns instance if there are no longer any subscribers .
