1
0
Fork 0

Ensure proper cleanup of stack local mutex.

This commit is contained in:
Max Neunhoeffer 2016-05-03 13:35:02 +02:00
parent 3e2bd943ed
commit 3c6b4d1197
1 changed files with 1 additions and 1 deletions

View File

@ -1060,6 +1060,7 @@ int ClusterInfo::createDatabaseCoordinator(std::string const& name,
auto agencyCallback = std::make_shared<AgencyCallback>(
ac, "Current/Databases/" + name, dbServerChanged, true, false);
_agencyCallbackRegistry->registerCallback(agencyCallback);
TRI_DEFER(_agencyCallbackRegistry->unregisterCallback(agencyCallback));
{
AgencyCommLocker locker("Plan", "WRITE");
@ -1103,7 +1104,6 @@ int ClusterInfo::createDatabaseCoordinator(std::string const& name,
count = 0;
}
}
_agencyCallbackRegistry->unregisterCallback(agencyCallback);
if (dbServerResult >= 0) {
return dbServerResult;
}