Skip to content

Commit

Permalink
[Minor] Fix order of objects destruction for http keepalive conns
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Mar 29, 2020
1 parent 4812f5a commit 230dcf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libserver/http/http_context.c
Expand Up @@ -53,8 +53,9 @@ rspamd_http_keepalive_queue_cleanup (GQueue *conns)
struct rspamd_http_keepalive_cbdata *cbd;

cbd = (struct rspamd_http_keepalive_cbdata *)cur->data;
rspamd_http_connection_unref (cbd->conn);
/* unref call closes fd, so we need to remove ev watcher first! */
rspamd_ev_watcher_stop (cbd->ctx->event_loop, &cbd->ev);
rspamd_http_connection_unref (cbd->conn);
g_free (cbd);

cur = cur->next;
Expand Down

0 comments on commit 230dcf4

Please sign in to comment.