ywkaras commented on code in PR #9672:
URL: https://github.com/apache/trafficserver/pull/9672#discussion_r1188008934
##########
iocore/net/OCSPStapling.cc:
##########
@@ -355,31 +355,43 @@ class HTTPRequest : public Continuation
fetch()
{
SCOPED_MUTEX_LOCK(lock, mutex, this_ethread());
+ this->_result = 0;
Review Comment:
Looking at this:
```
wkaras ~/REPOS/TS
O$ grep -e '\Wfetch(' -e '\Wset_done(' -e '\Wset_error(' $(findsrc)
./include/tscore/ArgParser.h: void set_error(std::string e);
./iocore/net/OCSPStapling.cc: this->fetch();
./iocore/net/OCSPStapling.cc: req->set_done();
./iocore/net/OCSPStapling.cc: req->set_error();
./iocore/net/OCSPStapling.cc: fetch()
./iocore/net/OCSPStapling.cc: set_done()
./iocore/net/OCSPStapling.cc: set_error()
./plugins/experimental/inliner/cache.h: fetch(const std::string &k, A
&&...a)
./plugins/experimental/slice/prefetch.cc: if (bg->fetch(data)) {
./plugins/experimental/slice/prefetch.cc:BgBlockFetch::fetch(Data *const
data)
./plugins/experimental/slice/prefetch.h: bool fetch(Data *const data);
./plugins/lua/ts_lua_fetch.c: /* ts.fetch() */
./src/tscore/ArgParser.cc:ArgParser::set_error(std::string e)
./src/tscore/unit_tests/test_ArgParser.cc: parser2.set_error("error");
wkaras ~/REPOS/TS
O$
```
it's clear that `fetch()`, `set_done()` and `set_error()` are only called by
`event_handler()`. So, the continuation mutex will already be locked when they
are called. It also means these member functions should be private. I suggest
you make them private as a part of this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]