X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fredis%2Fredisgeneral.cpp;h=f031a771eae552819bc5bb7325160660be28bf5a;hb=refs%2Fchanges%2F28%2F1028%2F1;hp=eb837ae05ac988ee944c6d94bf03a190d768e99d;hpb=b8cd8b6087862ff04c9e39a0235ebf870c28ce39;p=ric-plt%2Fsdl.git diff --git a/src/redis/redisgeneral.cpp b/src/redis/redisgeneral.cpp index eb837ae..f031a77 100644 --- a/src/redis/redisgeneral.cpp +++ b/src/redis/redisgeneral.cpp @@ -70,6 +70,9 @@ namespace if (startsWith("ERR Protocol error", rr->str, static_cast(rr->len))) return AsyncRedisCommandDispatcherErrorCode::PROTOCOL_ERROR; + if (startsWith("READONLY", rr->str, static_cast(rr->len))) + return AsyncRedisCommandDispatcherErrorCode::WRITING_TO_SLAVE; + std::ostringstream oss; oss << "redis reply error: " << std::string(rr->str, static_cast(rr->len)); logErrorOnce(oss.str());