diff options
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -237,6 +237,8 @@ connect_next(struct cfg *cfg, struct uring_task *task, struct connection *conn) unsigned i; again: + assert_task_alive_or(DBG_UR, task, goto out); + i = 0; remote = NULL; list_for_each_entry(tmp, conn->addrs, list) { @@ -250,8 +252,7 @@ again: if (!remote) { debug(DBG_UR, "%s: no more remote addresses to attempt\n", task->name); - conn->callback(cfg, conn, false); - return; + goto out; } conn->next_addr++; @@ -270,6 +271,10 @@ again: task->priv = conn; uring_task_set_fd(task, sfd); uring_connect(cfg, task, &conn->remote, connect_cb); + return; + +out: + conn->callback(cfg, conn, false); } void |