aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/conn.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/salticidae/conn.h')
-rw-r--r--include/salticidae/conn.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h
index e39d31d..b693b4f 100644
--- a/include/salticidae/conn.h
+++ b/include/salticidae/conn.h
@@ -267,8 +267,10 @@ class ConnPool {
conn->send_data_func = Conn::_send_data;
conn->recv_data_func = Conn::_recv_data;
enable_send_buffer(conn, client_fd);
- cpool->on_setup(conn);
- cpool->update_conn(conn, true);
+ cpool->disp_tcall->async_call([cpool, conn](ThreadCall::Handle &) {
+ cpool->on_setup(conn);
+ cpool->update_conn(conn, true);
+ });
}
assert(conn->fd != -1);
assert(conn->worker == this);