debugs(83, (xerrno == ECONNRESET) ? 1 : 2, "Error negotiating SSL connection on FD " << fd << ": " <<
(xerrno == 0 ? ERR_error_string(ssl_error, NULL) : xstrerr(xerrno)));
}
- comm_close(fd);
+ conn->clientConnection->close();
return false;
case SSL_ERROR_ZERO_RETURN:
debugs(83, DBG_IMPORTANT, "Error negotiating SSL connection on FD " << fd << ": Closed by client");
- comm_close(fd);
+ conn->clientConnection->close();
return false;
default:
debugs(83, DBG_IMPORTANT, "Error negotiating SSL connection on FD " <<
fd << ": " << ERR_error_string(ERR_get_error(), NULL) <<
" (" << ssl_error << "/" << ret << ")");
- comm_close(fd);
+ conn->clientConnection->close();
return false;
}
connState->sslBumpMode = bumpAction;
if (bumpAction == Ssl::bumpTerminate) {
- comm_close(connState->clientConnection->fd);
+ connState->clientConnection->close();
} else if (bumpAction != Ssl::bumpSplice) {
connState->startPeekAndSpliceDone();
} else {
assert(pinning.serverConnection == io.conn);
pinning.closeHandler = NULL; // Comm unregisters handlers before calling
const bool sawZeroReply = pinning.zeroReply; // reset when unpinning
+ pinning.serverConnection->noteClosure();
unpinConnection(false);
if (sawZeroReply && clientConnection != NULL) {
/** Close any open socket. */
void close();
+ /** Synchronize with Comm: Somebody closed our connection. */
+ void noteClosure();
+
/** determine whether this object describes an active connection or not. */
bool isOpen() const { return (fd >= 0); }
}
if (finalAction == Ssl::bumpTerminate) {
- comm_close(serverConn->fd);
- comm_close(clientConn->fd);
+ serverConn->close();
+ clientConn->close();
} else if (finalAction != Ssl::bumpSplice) {
//Allow write, proceed with the connection
srvBio->holdWrite(false);