setConn(aConn);
al = new AccessLogEntry;
al->cache.start_time = current_time;
- al->tcpClient = clientConnection = aConn->clientConnection;
- al->cache.port = aConn->port;
- al->cache.caddr = aConn->log_addr;
+ if (aConn) {
+ al->tcpClient = clientConnection = aConn->clientConnection;
+ al->cache.port = aConn->port;
+ al->cache.caddr = aConn->log_addr;
#if USE_OPENSSL
- if (aConn->clientConnection != NULL && aConn->clientConnection->isOpen()) {
- if (auto ssl = fd_table[aConn->clientConnection->fd].ssl.get())
- al->cache.sslClientCert.reset(SSL_get_peer_certificate(ssl));
- }
+ if (aConn->clientConnection != NULL && aConn->clientConnection->isOpen()) {
+ if (auto ssl = fd_table[aConn->clientConnection->fd].ssl.get())
+ al->cache.sslClientCert.reset(SSL_get_peer_certificate(ssl));
+ }
#endif
+ }
dlinkAdd(this, &active, &ClientActiveRequests);
}