mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
conversation: fix ConversationSyncFinished
This patch increase fetched conversation number earlier, so ConversationSyncFinished would not be emitted in case when second call to fetchNewCommits happened before receiving callback from onNeedSocket_. Change-Id: I72263768426fcce671029fd165323ce89e49e91b
This commit is contained in:
@ -403,6 +403,7 @@ ConversationModule::Impl::fetchNewCommits(const std::string& peer,
|
|||||||
conversationId.c_str());
|
conversationId.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
syncCnt.fetch_add(1);
|
||||||
onNeedSocket_(conversationId,
|
onNeedSocket_(conversationId,
|
||||||
deviceId,
|
deviceId,
|
||||||
[this,
|
[this,
|
||||||
@ -416,10 +417,10 @@ ConversationModule::Impl::fetchNewCommits(const std::string& peer,
|
|||||||
|| !conversation->second) {
|
|| !conversation->second) {
|
||||||
std::lock_guard<std::mutex> lk(pendingConversationsFetchMtx_);
|
std::lock_guard<std::mutex> lk(pendingConversationsFetchMtx_);
|
||||||
stopFetch(conversationId, deviceId);
|
stopFetch(conversationId, deviceId);
|
||||||
|
syncCnt.fetch_sub(1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
acc->addGitSocket(channel->deviceId(), conversationId, channel);
|
acc->addGitSocket(channel->deviceId(), conversationId, channel);
|
||||||
syncCnt.fetch_add(1);
|
|
||||||
conversation->second->sync(
|
conversation->second->sync(
|
||||||
peer,
|
peer,
|
||||||
deviceId,
|
deviceId,
|
||||||
|
Reference in New Issue
Block a user