Skip to content
Commit a150b147 authored by Luke Huang's avatar Luke Huang
Browse files

Fix race condition caused by fd reused for DnsResolver

There might be a gap between fd close and fd event listener unregister.
If fd is reused for another query during that gap, it might cause the
query failed with no response since addOnFileDescriptorEventListener
method failed. To fix this problem, we must ensure that fd event
listener is unregistered before fd closing.

Bug: 134310704
Test: atest DnsResolverTest

Merged-In: I443bb11b15845b079ee4370a7797e692e62fa3c8
(cherry picked from commit 07de4cf8)

Change-Id: I7041e67d8c906cbf88050e7d94245f8e15dcdbb4
parent c10f3c1c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment