diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/TransportService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/TransportService.java index 8641e1e96a1..82055c3cbc8 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/transport/TransportService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/transport/TransportService.java @@ -174,8 +174,8 @@ public class TransportService extends AbstractLifecycleComponent void sendRequest(final DiscoveryNode node, final String action, final Streamable message, final TimeValue timeout, final TransportResponseHandler handler) throws TransportException { final long requestId = newRequestId(); + Timeout timeoutX = null; try { - Timeout timeoutX = null; if (timeout != null) { timeoutX = timerService.newTimeout(new TimeoutTimerTask(requestId), timeout); } @@ -185,6 +185,9 @@ public class TransportService extends AbstractLifecycleComponent