mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +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());
|
||||
return;
|
||||
}
|
||||
syncCnt.fetch_add(1);
|
||||
onNeedSocket_(conversationId,
|
||||
deviceId,
|
||||
[this,
|
||||
@ -416,10 +417,10 @@ ConversationModule::Impl::fetchNewCommits(const std::string& peer,
|
||||
|| !conversation->second) {
|
||||
std::lock_guard<std::mutex> lk(pendingConversationsFetchMtx_);
|
||||
stopFetch(conversationId, deviceId);
|
||||
syncCnt.fetch_sub(1);
|
||||
return false;
|
||||
}
|
||||
acc->addGitSocket(channel->deviceId(), conversationId, channel);
|
||||
syncCnt.fetch_add(1);
|
||||
conversation->second->sync(
|
||||
peer,
|
||||
deviceId,
|
||||
|
Reference in New Issue
Block a user