Fix possible threading issue in RetrieveProfileJob.

This commit is contained in:
Greyson Parrelli 2022-04-11 12:00:01 -04:00
parent 08abe890ff
commit a92638e897

View file

@ -501,7 +501,9 @@ public class RetrieveProfileJob extends BaseJob {
if (recipient.getProfileKey() == null) return;
if (!Util.equals(profileAvatar, recipient.getProfileAvatar())) {
SignalDatabase.runPostSuccessfulTransaction(DEDUPE_KEY_RETRIEVE_AVATAR + recipient.getId(), () -> {
ApplicationDependencies.getJobManager().add(new RetrieveProfileAvatarJob(recipient, profileAvatar));
SignalExecutors.BOUNDED.execute(() -> {
ApplicationDependencies.getJobManager().add(new RetrieveProfileAvatarJob(recipient, profileAvatar));
});
});
}
}