Browse Source

[Minor] Fix another close/ev_modify race

tags/2.5
Vsevolod Stakhov 4 years ago
parent
commit
bae50b5b9c
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/libserver/http/http_context.c

+ 2
- 1
src/libserver/http/http_context.c View File

@@ -492,8 +492,9 @@ rspamd_http_keepalive_handler (gint fd, short what, gpointer ud)
rspamd_inet_address_to_string_pretty (cbdata->conn->keepalive_hash_key->addr),
cbdata->conn->keepalive_hash_key->host,
cbdata->queue->length);
rspamd_http_connection_unref (cbdata->conn);
/* unref call closes fd, so we need to remove ev watcher first! */
rspamd_ev_watcher_stop (cbdata->ctx->event_loop, &cbdata->ev);
rspamd_http_connection_unref (cbdata->conn);
g_free (cbdata);
}


Loading…
Cancel
Save