summaryrefslogtreecommitdiff
path: root/proxy_network.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2022-09-01 13:57:59 -0700
committerdormando <dormando@rydia.net>2022-09-02 23:07:58 -0700
commitd855e7ed9394d3c8ed110f22694930a22894de10 (patch)
treeac18cb783d67b88eadd3aa11246ca2cfc123d473 /proxy_network.c
parent597645db6a2b138710f01ffe5e92e453117b987a (diff)
downloadmemcached-d855e7ed9394d3c8ed110f22694930a22894de10.tar.gz
proxy: update mcmc and calling conventions
upstream fixes: mcmc would return OK to garbage responses, which was probably causing issues in the past. This does remove the MCMC_CODE_MISS and replace it with MCMC_CODE_END.
Diffstat (limited to 'proxy_network.c')
-rw-r--r--proxy_network.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/proxy_network.c b/proxy_network.c
index 65ff638..162c39b 100644
--- a/proxy_network.c
+++ b/proxy_network.c
@@ -533,15 +533,15 @@ static int proxy_backend_drive_machine(mcp_backend_t *be) {
case mcp_backend_parse:
r = p->client_resp;
r->status = mcmc_parse_buf(be->client, be->rbuf, be->rbufused, &r->resp);
- if (r->status != MCMC_OK) {
+
+ if (r->status == MCMC_ERR) {
P_DEBUG("%s: mcmc_read failed [%d]\n", __func__, r->status);
- if (r->status == MCMC_WANT_READ) {
+ if (r->resp.code == MCMC_WANT_READ) {
return EV_READ;
- } else {
- flags = -1;
- stop = true;
- break;
}
+ flags = -1;
+ stop = true;
+ break;
}
// we actually don't care about anything but the value length