IoEngine#SpawnCoroutine(): don't copy parameter

This commit is contained in:
Alexander A. Klimov 2020-02-05 15:30:03 +01:00
parent c37c40d8c6
commit d98493c90f

View File

@ -116,9 +116,9 @@ public:
/* With dedicated strand in *Connection classes. */
template <typename Handler, typename Function>
static void SpawnCoroutine(Handler h, Function f) {
static void SpawnCoroutine(Handler& h, Function f) {
boost::asio::spawn(std::forward<Handler>(h),
boost::asio::spawn(h,
[f](boost::asio::yield_context yc) {
try {