3
0
mirror of https://github.com/Qortal/qortal.git synced 2025-02-12 10:15:49 +00:00

Add extra isInterrupted() quick-exits to Controller during TRANSACTION_SIGNATURES processing.

This commit is contained in:
catbref 2019-06-20 08:50:39 +01:00
parent fc82bcaf49
commit c559c16a4a

View File

@ -728,6 +728,10 @@ public class Controller extends Thread {
continue;
}
// Check isInterrupted() here and exit fast
if (Thread.currentThread().isInterrupted())
return;
// Fetch actual transaction data from peer
Message getTransactionMessage = new GetTransactionMessage(signature);
Message responseMessage = peer.getResponse(getTransactionMessage);
@ -737,6 +741,10 @@ public class Controller extends Thread {
continue;
}
// Check isInterrupted() here and exit fast
if (Thread.currentThread().isInterrupted())
return;
TransactionMessage transactionMessage = (TransactionMessage) responseMessage;
TransactionData transactionData = transactionMessage.getTransactionData();
Transaction transaction = Transaction.fromData(repository, transactionData);