Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4f535bd authored by John Huang's avatar John Huang Committed by Android Git Automerger
Browse files

am 299e011e: am 54ca9066: Merge "Get rid of a race in NsdService in...

am 299e011e: am 54ca9066: Merge "Get rid of a race in NsdService in stopResolveService and getAddrInfo" into klp-dev

* commit '299e011e':
  Get rid of a race in NsdService in stopResolveService and getAddrInfo
parents 955b575d 299e011e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -483,10 +483,14 @@ public class NsdService extends INsdManager.Stub {
                        clientInfo.mResolvedService.setPort(Integer.parseInt(cooked[4]));

                        stopResolveService(id);
                        if (!getAddrInfo(id, cooked[3])) {
                        removeRequestMap(clientId, id, clientInfo);

                        int id2 = getUniqueId();
                        if (getAddrInfo(id2, cooked[3])) {
                            storeRequestMap(clientId, id2, clientInfo);
                        } else {
                            clientInfo.mChannel.sendMessage(NsdManager.RESOLVE_SERVICE_FAILED,
                                    NsdManager.FAILURE_INTERNAL_ERROR, clientId);
                            removeRequestMap(clientId, id, clientInfo);
                            clientInfo.mResolvedService = null;
                        }
                        break;