Closed ghost closed 6 years ago
I'll have a look. thanks
what's your javascript code?
do you call unwatch
and close
at the same time for instance?
Sequentially, yes: so after one another I have:
zeroconf.unwatch('_customtype._tcp.', 'local.'); zeroconf.close();
ok I see where is the problem. It'll be fixed in the next version.
FYI, close
should unwatch
all services so you should only need to close
.
Great stuff, thanks for the advice!
Please upgrade to 1.2.8 and let me know if it's better
Thanks becvert, works perfectly! (I tested on both iOS and Android). Huge performance difference for Android between 1.2.8 and 1.2.4, 1.2.8. is much faster.
Thank you 👍
Hi,
since upgrading from version 1.2.4 to 1.2.7 android devices cannot find advertised mdns services. Error log gives me the following:
java.lang.NullPointerException: Attempt to invoke direct method 'void net.becvert.cordova.ZeroConf$BrowserManager.unwatch(java.lang.String, java.lang.String)' on a null object reference at net.becvert.cordova.ZeroConf$BrowserManager.access$700(ZeroConf.java:384) at net.becvert.cordova.ZeroConf$5.run(ZeroConf.java:276) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)
I've since gone back to using 1.2.4 again. Great plugin, hope the above details suffice to solve the issue!
Regards