Updated handling of compareswap/delete. When error code is already set in get

do not overwrite it.
This commit is contained in:
arches 2016-06-20 05:33:13 -04:00
parent e84a1b0667
commit 1ff6d64d98
1 changed files with 5 additions and 2 deletions

View File

@ -71,11 +71,14 @@ etcdv3::AsyncTxnResponse& etcdv3::AsyncTxnResponse::ParseResponse()
error_message="Key already exists";
}
else if(action == "compareAndSwap" || action == "compareAndDelete")
{
if(!error_code)
{
error_code=101;
error_message="Compare failed";
}
}
}
prev_values = prev_range_kvs;