mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-04 21:29:48 -04:00
ignore failure after task runner canceled
This commit is contained in:
parent
58cead6035
commit
76859f822e
3 changed files with 9 additions and 1 deletions
|
@ -41,6 +41,7 @@ public class PlaceOfferProtocol {
|
|||
private Timer timeoutTimer;
|
||||
private final TransactionResultHandler resultHandler;
|
||||
private final ErrorMessageHandler errorMessageHandler;
|
||||
private TaskRunner<PlaceOfferModel> taskRunner;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -65,7 +66,7 @@ public class PlaceOfferProtocol {
|
|||
|
||||
startTimeoutTimer();
|
||||
|
||||
TaskRunner<PlaceOfferModel> taskRunner = new TaskRunner<>(model,
|
||||
taskRunner = new TaskRunner<>(model,
|
||||
() -> {
|
||||
|
||||
// reset timer if response not yet received
|
||||
|
@ -145,6 +146,7 @@ public class PlaceOfferProtocol {
|
|||
|
||||
private void handleError(String errorMessage) {
|
||||
if (timeoutTimer != null) {
|
||||
taskRunner.cancel();
|
||||
log.error(errorMessage);
|
||||
stopTimeoutTimer();
|
||||
model.getOpenOffer().getOffer().setErrorMessage(errorMessage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue