diff options
Diffstat (limited to 'proxy.c')
-rw-r--r-- | proxy.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -122,6 +122,8 @@ proxy_client_data_out(struct cfg *cfg, struct uring_task *task, int res) { struct server_proxy *proxy = container_of(task, struct server_proxy, clienttask); + assert_task_alive(DBG_PROXY, task); + if (res <= 0) { debug(DBG_PROXY, "%s: result was %i\n", proxy->scfg->name, res); uring_task_close_fd(cfg, task); @@ -139,6 +141,8 @@ proxy_client_data_in(struct cfg *cfg, struct uring_task *task, int res) { struct server_proxy *proxy = container_of(task, struct server_proxy, clienttask); + assert_task_alive(DBG_PROXY, task); + if (res <= 0) { debug(DBG_PROXY, "%s: result was %i\n", proxy->scfg->name, res); uring_task_close_fd(cfg, task); @@ -157,6 +161,8 @@ proxy_server_data_out(struct cfg *cfg, struct uring_task *task, int res) { struct server_proxy *proxy = container_of(task, struct server_proxy, servertask); + assert_task_alive(DBG_PROXY, task); + if (res <= 0) { debug(DBG_PROXY, "%s: result was %i\n", proxy->scfg->name, res); uring_task_close_fd(cfg, task); @@ -174,6 +180,8 @@ proxy_server_data_in(struct cfg *cfg, struct uring_task *task, int res) { struct server_proxy *proxy = container_of(task, struct server_proxy, servertask); + assert_task_alive(DBG_PROXY, task); + if (res <= 0) { debug(DBG_PROXY, "%s: result was %i\n", proxy->scfg->name, res); uring_task_close_fd(cfg, task); @@ -190,6 +198,9 @@ proxy_connected_cb(struct cfg *cfg, struct connection *conn, bool connected) { struct server_proxy *proxy = container_of(conn, struct server_proxy, server_conn); + assert_task_alive(DBG_PROXY, &proxy->clienttask); + assert_task_alive(DBG_PROXY, &proxy->servertask); + if (!connected) { error("%s: proxy connection to remote server failed\n", proxy->scfg->name); |