From 1084c7b6b20f51bd0d4ad66ddcc873ba4a813697 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sun, 1 Oct 2017 09:41:13 -0400 Subject: [PATCH] Log cause when a write and flush fails This commit logs the cause of a write and flush operation on the network layer that failed. --- .../java/org/elasticsearch/transport/netty4/Netty4Transport.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/transport-netty4/src/main/java/org/elasticsearch/transport/netty4/Netty4Transport.java b/modules/transport-netty4/src/main/java/org/elasticsearch/transport/netty4/Netty4Transport.java index 9cc75a08ee2..f85330ef759 100644 --- a/modules/transport-netty4/src/main/java/org/elasticsearch/transport/netty4/Netty4Transport.java +++ b/modules/transport-netty4/src/main/java/org/elasticsearch/transport/netty4/Netty4Transport.java @@ -321,6 +321,7 @@ public class Netty4Transport extends TcpTransport { listener.onResponse(channel); } else { final Throwable cause = f.cause(); + logger.error("write and flush on the network layer failed", cause); Netty4Utils.maybeDie(cause); assert cause instanceof Exception; listener.onFailure((Exception) cause);