mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Use lock when creating peer shard rangeset
This commit is contained in:
@@ -1381,9 +1381,10 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMStatusChange> const& m)
|
||||
|
||||
if (m->has_shardseqs())
|
||||
{
|
||||
shards_.clear();
|
||||
std::vector<std::string> tokens;
|
||||
boost::split(tokens, m->shardseqs(), boost::algorithm::is_any_of(","));
|
||||
std::lock_guard<std::mutex> sl(recentLock_);
|
||||
shards_.clear();
|
||||
for (auto const& t : tokens)
|
||||
{
|
||||
std::vector<std::string> seqs;
|
||||
|
||||
Reference in New Issue
Block a user