Skip to content

Commit

Permalink
[Android] Fix NsdService crash (#32284)
Browse files Browse the repository at this point in the history
* Fix NsdService crash in Android Platform

* Restyled by google-java-format

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
joonhaengHeo and restyled-commits authored Feb 23, 2024
1 parent 52f5f01 commit c49e784
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ public NsdServiceFinderAndResolver(
public void start() {
multicastLock.acquire();

this.nsdManager.discoverServices(
targetServiceInfo.getServiceType(), NsdManager.PROTOCOL_DNS_SD, this);

NsdServiceFinderAndResolver serviceFinderResolver = this;
this.stopDiscoveryRunnable =
Executors.newSingleThreadScheduledExecutor()
Expand All @@ -92,6 +89,9 @@ public void run() {
},
BROWSE_SERVICE_TIMEOUT_MS,
TimeUnit.MILLISECONDS);

this.nsdManager.discoverServices(
targetServiceInfo.getServiceType(), NsdManager.PROTOCOL_DNS_SD, this);
}

@Override
Expand Down

0 comments on commit c49e784

Please sign in to comment.