mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-25 23:39:26 -05:00
check offer availability off user thread
This commit is contained in:
parent
29a488d3af
commit
821d949fa7
@ -84,7 +84,6 @@ public class XmrLocalNode {
|
|||||||
// initialize connection manager to listen to local connection
|
// initialize connection manager to listen to local connection
|
||||||
this.connectionManager = new MoneroConnectionManager().setConnection(daemon.getRpcConnection());
|
this.connectionManager = new MoneroConnectionManager().setConnection(daemon.getRpcConnection());
|
||||||
this.connectionManager.setTimeout(REFRESH_PERIOD_LOCAL_MS);
|
this.connectionManager.setTimeout(REFRESH_PERIOD_LOCAL_MS);
|
||||||
this.connectionManager.checkConnection();
|
|
||||||
this.connectionManager.addListener((connection) -> {
|
this.connectionManager.addListener((connection) -> {
|
||||||
for (var listener : listeners) listener.onConnectionChanged(connection); // notify of connection changes
|
for (var listener : listeners) listener.onConnectionChanged(connection); // notify of connection changes
|
||||||
});
|
});
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
package haveno.core.offer;
|
package haveno.core.offer;
|
||||||
|
|
||||||
|
import haveno.common.ThreadUtils;
|
||||||
import haveno.common.UserThread;
|
import haveno.common.UserThread;
|
||||||
import haveno.common.crypto.KeyRing;
|
import haveno.common.crypto.KeyRing;
|
||||||
import haveno.common.crypto.PubKeyRing;
|
import haveno.common.crypto.PubKeyRing;
|
||||||
@ -153,7 +154,9 @@ public class Offer implements NetworkPayload, PersistablePayload {
|
|||||||
log.error(errorMessage);
|
log.error(errorMessage);
|
||||||
errorMessageHandler.handleErrorMessage(errorMessage);
|
errorMessageHandler.handleErrorMessage(errorMessage);
|
||||||
});
|
});
|
||||||
|
ThreadUtils.submitToPool((() -> {
|
||||||
availabilityProtocol.sendOfferAvailabilityRequest();
|
availabilityProtocol.sendOfferAvailabilityRequest();
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cancelAvailabilityRequest() {
|
public void cancelAvailabilityRequest() {
|
||||||
|
Loading…
Reference in New Issue
Block a user