wallet poll looper runs off thread so polls do not build up (#1993)

This commit is contained in:
woodser 2025-09-30 00:21:25 -04:00 committed by GitHub
parent 17afbca679
commit fbadb03ab7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -2856,7 +2856,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
if (isShutDownStarted || isPolling()) return;
updatePollPeriod();
log.info("Starting to poll wallet for {} {}", getClass().getSimpleName(), getId());
pollLooper = new TaskLooper(() -> pollWallet());
pollLooper = new TaskLooper(() -> new Thread(() -> pollWallet()).start());
pollLooper.start(pollPeriodMs);
}
}

View file

@ -1955,7 +1955,7 @@ public class XmrWalletService extends XmrWalletBase {
synchronized (walletLock) {
if (isShutDownStarted || isPolling()) return;
updatePollPeriod();
pollLooper = new TaskLooper(() -> pollWallet());
pollLooper = new TaskLooper(() -> new Thread(() -> pollWallet()).start());
pollLooper.start(pollPeriodMs);
}
}