Skip to content

Commit c49e784

Browse files
[Android] Fix NsdService crash (#32284)
* Fix NsdService crash in Android Platform * Restyled by google-java-format --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 52f5f01 commit c49e784

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/platform/android/java/chip/platform/NsdServiceFinderAndResolver.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ public NsdServiceFinderAndResolver(
7171
public void start() {
7272
multicastLock.acquire();
7373

74-
this.nsdManager.discoverServices(
75-
targetServiceInfo.getServiceType(), NsdManager.PROTOCOL_DNS_SD, this);
76-
7774
NsdServiceFinderAndResolver serviceFinderResolver = this;
7875
this.stopDiscoveryRunnable =
7976
Executors.newSingleThreadScheduledExecutor()
@@ -92,6 +89,9 @@ public void run() {
9289
},
9390
BROWSE_SERVICE_TIMEOUT_MS,
9491
TimeUnit.MILLISECONDS);
92+
93+
this.nsdManager.discoverServices(
94+
targetServiceInfo.getServiceType(), NsdManager.PROTOCOL_DNS_SD, this);
9595
}
9696

9797
@Override

0 commit comments

Comments
 (0)