Close device's source resolution on teardown 15/108915/2
authorSangwook Ha <sangwook.ha@verizon.com>
Mon, 2 Oct 2023 20:24:48 +0000 (13:24 -0700)
committerPeter Suna <peter.suna@pantheon.tech>
Fri, 10 Nov 2023 14:19:03 +0000 (15:19 +0100)
commitc262d7912fba8fed542860f527dc173977d022dd
tree8d8e96440f59438a6e7c7e56d30e4e094e2172fd
parentc7190c8cced3b56410e6cf57d637be1accd2c1d0
Close device's source resolution on teardown

Checking the current connection status is not enough to guarantee that
schema setup was completed for the initial session-up event.

To resolve this close ListenableFuture for device schema resolution
when the 'onRemoteSessionDown' method is called.

This prevents unnecessary duplicate notification, creating duplicate
SchemaContext and avoid confusion in the connection state.

JIRA: NETCONF-1173
Change-Id: I7f84da4a9197db52a0c33d2640e0c2543e587d7b
(cherry picked from commit e9518fdc4410b5407318d4b3bcc7fa333e296c55)
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/NetconfDevice.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/NetconfDeviceTest.java