Skip to content

Commit

Permalink
Fix TSan report around condvar in host resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Jun 23, 2024
1 parent 1c2946b commit e55b7df
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ bool GeneralHTTPCredentialsProvider::ShouldCreateGeneralHTTPProvider(const Aws::
shouldAllow = !addresses.empty();
hostResolved = true;
}
hostResolverCV.notify_one();
else
{
std::unique_lock<std::mutex> lock(hostResolverMutex);
hostResolverCV.notify_one();
}
};
pHostResolver->ResolveHost(authority.c_str(), onHostResolved);
std::unique_lock<std::mutex> lock(hostResolverMutex);
Expand Down Expand Up @@ -259,4 +263,4 @@ void GeneralHTTPCredentialsProvider::RefreshIfExpired()
}

Reload();
}
}

0 comments on commit e55b7df

Please sign in to comment.