Fixed bug with our swarm nodes being removed from memory after a successful request because of returning a reference

pull/164/head
Beaudan 6 years ago
parent cc3f98b20a
commit 25383458b1

@ -282,7 +282,7 @@ class LokiMessageAPI {
await Promise.all(
Object.entries(ourSwarmNodes)
.splice(0, remainingRequests)
.map(([nodeUrl, lastHash]) => doRequest(nodeUrl, lastHash))
.map(([nodeUrl, nodeData]) => doRequest(nodeUrl, nodeData))
);
}
}

@ -103,7 +103,7 @@ class LokiSnodeAPI {
};
});
}
return this.ourSwarmNodes;
return {...this.ourSwarmNodes};
}
async refreshSwarmNodesForPubKey(pubKey) {

Loading…
Cancel
Save