notify listeners of updated offers on new thread

This commit is contained in:
woodser 2025-04-15 15:38:32 -04:00
parent c87b8a5b45
commit 35801f9536
No known key found for this signature in database
GPG Key ID: 55A10DD48ADEE5EF

View File

@ -425,8 +425,12 @@ public class OfferBookService {
updateReservedFundsSpentStatus(offer);
synchronized (offerBookChangedListeners) {
offerBookChangedListeners.forEach(listener -> {
listener.onRemoved(offer);
listener.onAdded(offer);
// notify off thread to avoid deadlocking
new Thread(() -> {
listener.onRemoved(offer);
listener.onAdded(offer);
}).start();
});
}
}