summaryrefslogtreecommitdiff
path: root/proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'proxy.c')
-rw-r--r--proxy.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/proxy.c b/proxy.c
index bcc2b6d..7fb6c34 100644
--- a/proxy.c
+++ b/proxy.c
@@ -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);