From 4fdac38ad5796cae03f827670655efd79d953699 Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 19 Nov 2018 00:54:56 -0500 Subject: fix bug in remove_conn --- include/salticidae/conn.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h index 777c480..ea5ccf2 100644 --- a/include/salticidae/conn.h +++ b/include/salticidae/conn.h @@ -196,6 +196,7 @@ class ConnPool { std::this_thread::get_id()); return; } + assert(conn->fd != -1); SALTICIDAE_LOG_INFO("worker %x got %s", std::this_thread::get_id(), std::string(*conn).c_str()); @@ -243,7 +244,7 @@ class ConnPool { void accept_client(int, int); conn_t add_conn(const conn_t &conn); - void remove_conn(int fd); + void del_conn(const conn_t &conn); protected: conn_t _connect(const NetAddr &addr); -- cgit v1.2.3-70-g09d2