diff options
author | Determinant <ted.sybil@gmail.com> | 2019-06-27 20:33:06 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-06-27 20:33:06 -0400 |
commit | d15ec0b93def57e5f3832f429a3b948e86a62887 (patch) | |
tree | 407070a72607b6b0f0b1742e3676c731fb3f7e06 /include/salticidae/conn.h | |
parent | 85552ce1b0bc997f58341f21ab8bbcf7d937ab4b (diff) |
finish p2p & TLS integration and testing
Diffstat (limited to 'include/salticidae/conn.h')
-rw-r--r-- | include/salticidae/conn.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h index 87966ac..e39d31d 100644 --- a/include/salticidae/conn.h +++ b/include/salticidae/conn.h @@ -195,7 +195,12 @@ class ConnPool { if (enable_tls && connected) { conn->worker->get_tcall()->async_call([this, conn, ret](ThreadCall::Handle &) { - if (ret) conn->recv_data_func = Conn::_recv_data_tls; + if (ret) + { + conn->recv_data_func = Conn::_recv_data_tls; + conn->ev_socket.del(); + conn->ev_socket.add(FdEvent::READ | FdEvent::WRITE); + } else worker_terminate(conn); }); } @@ -262,6 +267,7 @@ 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); } assert(conn->fd != -1); |