NetconfClientFactoryImpl should propagate stack failure 06/110306/5
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 25 Feb 2024 14:01:46 +0000 (15:01 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 25 Feb 2024 14:08:28 +0000 (15:08 +0100)
commitb51c3f7500a1e46d18ab65621a6db4780a9a83dc
treef7baa9a21c316366c1b04ca3569e0a9e2c7a7bf4
parent9eb7f7c0b96306a5eb21ba3285b2ffce779706ed
NetconfClientFactoryImpl should propagate stack failure

createClient() is ignoring failures to set up the transport stack,
leading to the future not completing on, for example, refused
connection.

Fix this by making ClientTransportChannelListener also a FutureCallback,
routing such failures to the returned future.

JIRA: NETCONF-1252
Change-Id: I3abc1faed94ee793ac6116eaca56a3cf473d8261
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
protocol/netconf-client/src/main/java/org/opendaylight/netconf/client/ClientTransportChannelListener.java
protocol/netconf-client/src/main/java/org/opendaylight/netconf/client/NetconfClientFactoryImpl.java
protocol/netconf-client/src/test/java/org/opendaylight/netconf/client/NC1252Test.java [new file with mode: 0644]