Do not change NetconfSessionPromise to failure 14/108414/1
authorSangwook Ha <sangwook.ha@verizon.com>
Fri, 30 Jun 2023 22:54:34 +0000 (15:54 -0700)
committerRobert Varga <nite@hq.sk>
Mon, 16 Oct 2023 21:16:18 +0000 (21:16 +0000)
commitcf6c64095d0b68ece7949b119935d778c0981e20
tree456441222be1b5f3ee373d4534351eeb61400057
parent39653430546f808004f20c988c4b1c7f637106b9
Do not change NetconfSessionPromise to failure

Setting NetconfSessionPromise to failure when session negotiation fails
prevents recovery from a temporary session negotiation issue.
The state change does not prevent a new connection attempt but the
NETCONF session can never be fully established successfully even if the
negotiation itself is successful because it is tried with the same
promise which has already been set to failure.

Do not change the promise to failure when the session negotiation fails,
and leave the decision to ReconnectStrategy.

JIRA: NETCONF-1067
Change-Id: Id021d268f80f9991a2517a20ed105d3c1d87069c
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 09c09ffbff1a8cb1dd6926be41464b3fb3a0a24f)
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java
netconf/netconf-netty-util/src/test/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiatorTest.java