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

@ -72,8 +72,11 @@ etcdv3::AsyncTxnResponse& etcdv3::AsyncTxnResponse::ParseResponse()
} }
else if(action == "compareAndSwap" || action == "compareAndDelete") else if(action == "compareAndSwap" || action == "compareAndDelete")
{ {
error_code=101; if(!error_code)
error_message="Compare failed"; {
error_code=101;
error_message="Compare failed";
}
} }
} }