if (session) {
priv = session->priv;
+ msg_debug_milter ("destroying milter session");
if (event_get_base (&priv->ev)) {
event_del (&priv->ev);
version, actions, protocol);
break;
case RSPAMD_MILTER_CMD_QUIT:
- msg_debug_milter ("quit command");
+ msg_debug_milter ("quit command, refcount: %d", session->ref.refcount);
priv->state = RSPAMD_MILTER_WANNA_DIE;
REF_RETAIN (session);
priv->fin_cb (priv->fd, session, priv->ud);
struct rspamd_proxy_session *session = ud;
struct rspamd_http_message *msg;
+ session->client_milter_conn = rms;
+
if (rms->message == NULL || rms->message->len == 0) {
msg_info_session ("finished milter connection");
proxy_backend_close_connection (session->master_conn);
sizeof (*session->master_conn));
}
- session->client_milter_conn = rms;
msg = rspamd_milter_to_http (rms);
-
session->master_conn->s = session;
session->master_conn->name = "master";
session->client_message = msg;