check offer availability off user thread

This commit is contained in:
woodser 2024-01-23 17:03:04 -05:00
parent 29a488d3af
commit 821d949fa7
2 changed files with 4 additions and 2 deletions

View File

@ -84,7 +84,6 @@ public class XmrLocalNode {
// initialize connection manager to listen to local connection
this.connectionManager = new MoneroConnectionManager().setConnection(daemon.getRpcConnection());
this.connectionManager.setTimeout(REFRESH_PERIOD_LOCAL_MS);
this.connectionManager.checkConnection();
this.connectionManager.addListener((connection) -> {
for (var listener : listeners) listener.onConnectionChanged(connection); // notify of connection changes
});

View File

@ -17,6 +17,7 @@
package haveno.core.offer;
import haveno.common.ThreadUtils;
import haveno.common.UserThread;
import haveno.common.crypto.KeyRing;
import haveno.common.crypto.PubKeyRing;
@ -153,7 +154,9 @@ public class Offer implements NetworkPayload, PersistablePayload {
log.error(errorMessage);
errorMessageHandler.handleErrorMessage(errorMessage);
});
availabilityProtocol.sendOfferAvailabilityRequest();
ThreadUtils.submitToPool((() -> {
availabilityProtocol.sendOfferAvailabilityRequest();
}));
}
public void cancelAvailabilityRequest() {