diff options
author | Alex Auvolat <alex@adnab.me> | 2022-07-04 14:00:02 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-07-04 14:00:02 +0200 |
commit | b6d59ec19a3d41ce581716cf0dda5d47c2785843 (patch) | |
tree | 9f5147aeb868c62eb4d628258e4c2790a9cf4a6e /src/k2v-client/lib.rs | |
parent | 0850bac874029f0b8b278d75537dd037e5db57da (diff) | |
download | garage-b6d59ec19a3d41ce581716cf0dda5d47c2785843.tar.gz garage-b6d59ec19a3d41ce581716cf0dda5d47c2785843.zip |
Fix poll item when item didn't changek2v-poll-fix
Diffstat (limited to 'src/k2v-client/lib.rs')
-rw-r--r-- | src/k2v-client/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/k2v-client/lib.rs b/src/k2v-client/lib.rs index 95974d7a..c2606af4 100644 --- a/src/k2v-client/lib.rs +++ b/src/k2v-client/lib.rs @@ -122,14 +122,14 @@ impl K2vClient { let res = self.dispatch(req, Some(timeout + DEFAULT_TIMEOUT)).await?; - let causality = res - .causality_token - .ok_or_else(|| Error::InvalidResponse("missing causality token".into()))?; - if res.status == StatusCode::NOT_MODIFIED { return Ok(None); } + let causality = res + .causality_token + .ok_or_else(|| Error::InvalidResponse("missing causality token".into()))?; + if res.status == StatusCode::NO_CONTENT { return Ok(Some(CausalValue { causality, |