balthazar / react-native-zeroconf

:satellite: Discover Zeroconf services using react-native
MIT License
211 stars 96 forks source link

Local discovery: Local devices do not get removed from list automatically or by again rescanning for android,iOS both #179

Open shiv-sky opened 8 months ago

shiv-sky commented 8 months ago

Find Implementation Details Initialization: this.zeroconf = new Zeroconf() this.zeroconf?.scan('http', 'tcp', 'local.') this.zeroconf?.on('start', this.onLocalScanningStart) this.zeroconf?.on('stop', this.onLocalScanningStop) this.zeroconf?.on('resolved', this.onDeviceDetected) this.zeroconf?.on('error', this.onErrorInLocalScanning) this.zeroconf?.on('remove',(name)=>this.onRemove(name))


Force Rescan this.zeroconf?.stop() this.zeroconf?.removeDeviceListeners?.() this.zeroconf = null setTimeout(() => { this.initZeroConfig() },1000)

Version: react-native-zeroconf: 0.13.7

Please let me know solution. Thanks