mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-20 07:46:05 -04:00
Move comment closer to timer creation
For consistency across classes.
This commit is contained in:
parent
b814eff5f1
commit
0d32a3b5ce
@ -67,8 +67,8 @@ public class GetDataRequestHandler {
|
||||
GetDataResponse getDataResponse = new GetDataResponse(new HashSet<>(dataStorage.getMap().values()),
|
||||
getDataRequest.getNonce());
|
||||
|
||||
if (timeoutTimer == null) { // setup before sending to avoid race conditions
|
||||
timeoutTimer = UserThread.runAfter(() -> {
|
||||
if (timeoutTimer == null) {
|
||||
timeoutTimer = UserThread.runAfter(() -> { // setup before sending to avoid race conditions
|
||||
String errorMessage = "A timeout occurred for getDataResponse:" + getDataResponse +
|
||||
" on connection:" + connection;
|
||||
handleFault(errorMessage, CloseConnectionReason.SEND_MSG_TIMEOUT, connection);
|
||||
|
@ -88,8 +88,8 @@ public class RequestDataHandler implements MessageListener {
|
||||
else
|
||||
getDataRequest = new GetUpdatedDataRequest(networkNode.getNodeAddress(), nonce);
|
||||
|
||||
if (timeoutTimer == null) { // setup before sending to avoid race conditions
|
||||
timeoutTimer = UserThread.runAfter(() -> {
|
||||
if (timeoutTimer == null) {
|
||||
timeoutTimer = UserThread.runAfter(() -> { // setup before sending to avoid race conditions
|
||||
if (!stopped) {
|
||||
String errorMessage = "A timeout occurred at sending getDataRequest:" + getDataRequest +
|
||||
" on nodeAddress:" + nodeAddress;
|
||||
|
@ -85,8 +85,8 @@ class PeerExchangeHandler implements MessageListener {
|
||||
if (networkNode.getNodeAddress() != null) {
|
||||
GetPeersRequest getPeersRequest = new GetPeersRequest(networkNode.getNodeAddress(), nonce, peerManager.getConnectedNonSeedNodeReportedPeers(nodeAddress));
|
||||
|
||||
if (timeoutTimer == null) { // setup before sending to avoid race conditions
|
||||
timeoutTimer = UserThread.runAfter(() -> {
|
||||
if (timeoutTimer == null) {
|
||||
timeoutTimer = UserThread.runAfter(() -> { // setup before sending to avoid race conditions
|
||||
if (!stopped) {
|
||||
String errorMessage = "A timeout occurred at sending getPeersRequest:" + getPeersRequest + " for nodeAddress:" + nodeAddress;
|
||||
log.info(errorMessage + " / PeerExchangeHandler=" +
|
||||
|
Loading…
x
Reference in New Issue
Block a user