becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

unwatch crash on android #5

Closed TonyVie closed 8 years ago

TonyVie commented 8 years ago

Hi !

You should check browser in unwatch method: private void unwatch(String type) { if (browser != null) browser.removeServiceListener(type, this); }

becvert commented 8 years ago

I'll have a look

TonyVie commented 8 years ago

Thanks ! You might also want to check publisher in the unregister method:

private void unregister(String type, String name) { if (publisher == null) return;

becvert commented 8 years ago

Fixed! Thank you

TonyVie commented 8 years ago

Hi (again :))

Is it possible that some concurency issues can happen in unregister method ?

I experienced some exeptions that I had to catch to prevent crash, but it does not seem to be a good idea:

becvert commented 8 years ago

Maybe have a look directly with jmdns I'm trying to get my hand on the latest version of this library, if they could only update the maven repo that'd be nice!