diff options
author | Determinant <ted.sybil@gmail.com> | 2019-07-01 02:40:45 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-07-01 02:40:45 -0400 |
commit | 19082449b9cc5f8004a9591af8e493c069671396 (patch) | |
tree | 31fb62acfe10fd650aa8e6efd25692b6b210253d /include/salticidae/conn.h | |
parent | 8bcaadaa42e2c91230faf850d10c29703578ef7b (diff) |
better peer teardown
Diffstat (limited to 'include/salticidae/conn.h')
-rw-r--r-- | include/salticidae/conn.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<typename Func> - void reg_conn_handler(Func cb) { conn_cb = cb; } + void reg_conn_handler(Func &&cb) { conn_cb = std::forward<Func>(cb); } template<typename Func> - void reg_error_handler(Func cb) { error_cb = cb; } + void reg_error_handler(Func &&cb) { error_cb = std::forward<Func>(cb); } void terminate(const conn_t &conn) { disp_tcall->async_call([this, conn](ThreadCall::Handle &) { |