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
Loading
Please register or sign in to comment