Fix list watches

This commit is contained in:
Antonio Andelic 2022-07-13 09:23:05 +00:00
parent 0555477ec1
commit ee4828b084

View File

@ -1993,8 +1993,10 @@ KeeperStorage::ResponsesForSessions KeeperStorage::processRequest(
{ {
if (response->error == Coordination::Error::ZOK) if (response->error == Coordination::Error::ZOK)
{ {
auto & watches_type static constexpr std::array list_requests{
= zk_request->getOpNum() == Coordination::OpNum::List || zk_request->getOpNum() == Coordination::OpNum::SimpleList Coordination::OpNum::List, Coordination::OpNum::SimpleList, Coordination::OpNum::FilteredList};
auto & watches_type = std::find(list_requests.begin(), list_requests.end(), zk_request->getOpNum()) != list_requests.end()
? list_watches ? list_watches
: watches; : watches;