peerConnectFailed(p);
callBack();
-
- closeQuietly();
-}
-
-void
-Security::PeerConnector::closeQuietly()
-{
disconnect();
+
if (noteFwdPconnUse)
fwdPconnPool->noteUses(fd_table[serverConn->fd].pconn.uses);
serverConn->close();
// XXX: unregister fd-closure monitoring and CommSetSelect interest, if any
AsyncJob::swanSong();
- if (!callback)
- return;
-
- if (callback->canceled()) {
- debugs(83, 3, "cancelled by the caller");
- closeQuietly();
+ if (callback) {
+ // job-ending emergencies like handleStopRequest() or callException()
+ const auto anErr = new ErrorState(ERR_GATEWAY_FAILURE, Http::scInternalServerError, request.getRaw(), al);
+ bail(anErr);
+ assert(!callback);
return;
}
- // paranoid: we have left the caller waiting
- debugs(83, DBG_IMPORTANT, "BUG: Unexpected state while connecting to a cache_peer or origin server");
- const auto anErr = new ErrorState(ERR_GATEWAY_FAILURE, Http::scInternalServerError, request.getRaw(), al);
- bail(anErr);
- assert(!callback);
}
const char *
static void NegotiateSsl(int fd, void *data);
void negotiateSsl();
- void closeQuietly();
-
/// The maximum allowed missing certificates downloads.
static const unsigned int MaxCertsDownloads = 10;
/// The maximum allowed nested certificates downloads.