Skip to content
Snippets Groups Projects
Commit 4338f100 authored by est31's avatar est31
Browse files

Fix redis erroring on non found blocks

Thanks to @netinetwalker for spotting the error, proposing a fix, and testing it.

Error due to @est31's merging changes to PR #3202 to add more error reporting for invalid reply types, commit:

524a7656 "redis: throw error if block request failed"

Now we branch out on the valid reply type "not found".
parent 88a44122
No related branches found
No related tags found
No related merge requests found
......@@ -126,6 +126,11 @@ std::string Database_Redis::loadBlock(const v3s16 &pos)
throw FileNotGoodException(std::string(
"Redis command 'HGET %s %s' errored: ") + errstr);
}
case REDIS_REPLY_NIL: {
// block not found in database
freeReplyObject(reply);
return "";
}
}
errorstream << "loadBlock: loading block " << PP(pos)
<< " returned invalid reply type " << reply->type
......
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