From 773757f2ddb04797d2b109297d4122ab6f2d015a Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 27 Jun 2017 19:07:27 +0200 Subject: [PATCH] Introduce EpollSocketChannelConfig.setTcpKeepCnt as replacement for setTcpKeepCntl. Motivation: We had a typo in the method name of the EpollSocketChannelConfig. Modifications: Deprecate old method and introduce a new one. Result: Fixes [#6909] --- .../channel/epoll/EpollSocketChannelConfig.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannelConfig.java b/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannelConfig.java index 4ac335619b..eaf2523b98 100644 --- a/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannelConfig.java +++ b/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannelConfig.java @@ -141,7 +141,7 @@ public final class EpollSocketChannelConfig extends EpollChannelConfig implement } else if (option == EpollChannelOption.TCP_KEEPIDLE) { setTcpKeepIdle((Integer) value); } else if (option == EpollChannelOption.TCP_KEEPCNT) { - setTcpKeepCntl((Integer) value); + setTcpKeepCnt((Integer) value); } else if (option == EpollChannelOption.TCP_KEEPINTVL) { setTcpKeepIntvl((Integer) value); } else if (option == EpollChannelOption.TCP_USER_TIMEOUT) { @@ -414,10 +414,18 @@ public final class EpollSocketChannelConfig extends EpollChannelConfig implement } } + /** + * @deprecated use {@link #setTcpKeepCnt(int)} + */ + @Deprecated + public EpollSocketChannelConfig setTcpKeepCntl(int probes) { + return setTcpKeepCnt(probes); + } + /** * Set the {@code TCP_KEEPCNT} option on the socket. See {@code man 7 tcp} for more details. */ - public EpollSocketChannelConfig setTcpKeepCntl(int probes) { + public EpollSocketChannelConfig setTcpKeepCnt(int probes) { try { channel.socket.setTcpKeepCnt(probes); return this;