Fix elephant oversight

This commit is contained in:
Alexander A. Klimov 2018-09-18 15:47:44 +02:00 committed by Michael Friedrich
parent 315e9ffad8
commit ed3db5b491
1 changed files with 3 additions and 3 deletions

View File

@ -31,16 +31,16 @@ Dictionary::Ptr RedisWriter::GetStats()
Dictionary::Ptr stats = new Dictionary();
//TODO: Figure out if more stats can be useful here.
Dictionary::Ptr statsFunctions = ScriptGlobal::Get("StatsFunctions", &Empty);
Namespace::Ptr statsFunctions = ScriptGlobal::Get("StatsFunctions", &Empty);
if (!statsFunctions)
Dictionary::Ptr();
ObjectLock olock(statsFunctions);
for (const Dictionary::Pair& kv : statsFunctions)
for (auto& kv : statsFunctions)
{
Function::Ptr func = kv.second;
Function::Ptr func = kv.second->Get();
if (!func)
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid status function name."));