From a7c07db1cea6e3ad0ebb9a5c94e51ef1aee7f102 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Tue, 9 Mar 2021 02:32:23 +0000 Subject: [PATCH] Fix double test crash --- proxy/http/HttpCacheSM.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxy/http/HttpCacheSM.cc b/proxy/http/HttpCacheSM.cc index 2bab3be01f4..41fe246184e 100644 --- a/proxy/http/HttpCacheSM.cc +++ b/proxy/http/HttpCacheSM.cc @@ -196,8 +196,6 @@ HttpCacheSM::state_cache_open_write(int event, void *data) if (read_retry_on_write_fail || open_write_tries <= master_sm->t_state.txn_conf->max_cache_open_write_retries) { // Retry open write; open_write_cb = false; - // reset captive_action since HttpSM cancelled it - captive_action.cancelled = 0; do_schedule_in(); } else { // The cache is hosed or full or something. @@ -339,6 +337,9 @@ HttpCacheSM::open_write(const HttpCacheKey *key, URL *url, HTTPHdr *request, Cac open_write_tries++; this->retry_write = retry; + // Reset the action in case an earlier attempt to open was canceled. + captive_action.cancelled = 0; + // We should be writing the same document we did // a lookup on // this is no longer true for multiple cache lookup