diff --git a/include/opendht/dhtrunner.h b/include/opendht/dhtrunner.h index a55d4b8ec9cc34d5c8598bdd1ff2532cfff7ce5d..5dc845161af24edaea971316d8505557aad850fe 100644 --- a/include/opendht/dhtrunner.h +++ b/include/opendht/dhtrunner.h @@ -272,8 +272,8 @@ public: * Insert known nodes to the routing table, without necessarly ping them. * Usefull to restart a node and get things running fast without putting load on the network. */ - void bootstrap(std::vector<SockAddr> nodes, DoneCallbackSimple&& cb={}); - void bootstrap(const SockAddr& addr, DoneCallbackSimple&& cb={}); + void bootstrap(std::vector<SockAddr> nodes, DoneCallbackSimple cb={}); + void bootstrap(const SockAddr& addr, DoneCallbackSimple cb={}); /** * Insert known nodes to the routing table, without necessarly ping them. diff --git a/src/dhtrunner.cpp b/src/dhtrunner.cpp index ce7b34c413a15b350f9517ee7431e0a8ca81ad92..7209c42a52dd220899fbd3ae74773386d1d8d493 100644 --- a/src/dhtrunner.cpp +++ b/src/dhtrunner.cpp @@ -1036,7 +1036,7 @@ DhtRunner::clearBootstrap() } void -DhtRunner::bootstrap(std::vector<SockAddr> nodes, DoneCallbackSimple&& cb) +DhtRunner::bootstrap(std::vector<SockAddr> nodes, DoneCallbackSimple cb) { if (running != State::Running) { cb(false); @@ -1066,7 +1066,7 @@ DhtRunner::bootstrap(std::vector<SockAddr> nodes, DoneCallbackSimple&& cb) } void -DhtRunner::bootstrap(const SockAddr& addr, DoneCallbackSimple&& cb) +DhtRunner::bootstrap(const SockAddr& addr, DoneCallbackSimple cb) { std::unique_lock<std::mutex> lck(storage_mtx); if (running != State::Running) {