assert(buf == gopherState->replybuf);
- if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) {
+ // XXX: Should update delayId, statCounter, etc. before bailing
+ if (!entry->isAccepting()) {
+ debugs(10, 3, "terminating due to bad " << *entry);
+ // TODO: Do not abuse connection for triggering cleanup.
gopherState->serverConn->close();
return;
}
statCounter.server.other.kbytes_out += size;
}
+ if (!entry->isAccepting()) {
+ debugs(10, 3, "terminating due to bad " << *entry);
+ // TODO: Do not abuse connection for triggering cleanup.
+ gopherState->serverConn->close();
+ return;
+ }
+
if (errflag) {
const auto err = new ErrorState(ERR_WRITE_ERROR, Http::scServiceUnavailable, gopherState->fwd->request, gopherState->fwd->al);
err->xerrno = xerrno;
Must(!flags.headers_parsed);
}
+ if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) {
+ abortTransaction("store entry aborted while we were waiting for processReply()");
+ return;
+ }
+
if (!flags.headers_parsed) { // have not parsed headers yet?
PROF_start(HttpStateData_processReplyHeader);
processReplyHeader();
return;
}
+ if (!e->isAccepting()) {
+ debugs(52, 3, "terminating due to bad " << *e);
+ delete urnState;
+ return;
+ }
+
/* Update reqofs to point to where in the buffer we'd be */
urnState->reqofs += result.length;
debugs(75, 3, HERE << conn << " read " << aBufferLength << " bytes");
debugs(75, 5, "{" << aBuffer << "}");
+ // TODO: Honor delay pools.
+
+ // XXX: Update statCounter before bailing
+ if (!entry->isAccepting()) {
+ debugs(52, 3, "terminating due to bad " << *entry);
+ // TODO: Do not abuse connection for triggering cleanup.
+ conn->close();
+ return;
+ }
+
if (flag != Comm::OK) {
debugs(50, 2, conn << ": read failure: " << xstrerr(xerrno));