From 19082449b9cc5f8004a9591af8e493c069671396 Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 1 Jul 2019 02:40:45 -0400 Subject: better peer teardown --- include/salticidae/conn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/salticidae/conn.h') diff --git a/include/salticidae/conn.h b/include/salticidae/conn.h index a345845..316d9cf 100644 --- a/include/salticidae/conn.h +++ b/include/salticidae/conn.h @@ -575,10 +575,10 @@ class ConnPool { } template - void reg_conn_handler(Func cb) { conn_cb = cb; } + void reg_conn_handler(Func &&cb) { conn_cb = std::forward(cb); } template - void reg_error_handler(Func cb) { error_cb = cb; } + void reg_error_handler(Func &&cb) { error_cb = std::forward(cb); } void terminate(const conn_t &conn) { disp_tcall->async_call([this, conn](ThreadCall::Handle &) { -- cgit v1.2.3