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.
This commit is contained in:
Jason Tedor 2017-10-01 09:41:13 -04:00
parent f79842be6f
commit 1084c7b6b2
1 changed files with 1 additions and 0 deletions

View File

@ -321,6 +321,7 @@ public class Netty4Transport extends TcpTransport<Channel> {
listener.onResponse(channel); listener.onResponse(channel);
} else { } else {
final Throwable cause = f.cause(); final Throwable cause = f.cause();
logger.error("write and flush on the network layer failed", cause);
Netty4Utils.maybeDie(cause); Netty4Utils.maybeDie(cause);
assert cause instanceof Exception; assert cause instanceof Exception;
listener.onFailure((Exception) cause); listener.onFailure((Exception) cause);