Skip to content
Snippets Groups Projects
Commit b0fb476d authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dhtrunner: pass function argument by value

parent fada8d06
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment