Fix state transition thinko 10/101410/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 31 May 2022 18:37:29 +0000 (20:37 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 1 Jun 2022 13:40:34 +0000 (15:40 +0200)
commita69814dc4e8e0c83961cd962b64d75dd6d071999
tree53df4106e652a5fe09c60b76cdc3641b76d7389b
parent995beff9f202bac6db076b9369ea415b7670ab6c
Fix state transition thinko

The future returned from reconnect strategy may have completed before
we add a listener. Make sure we record the future before adding the
listener.

Also change checkState() to a verify() with a proper identity check
to work with nulls and a proper message.

JIRA: NETCONF-827
Change-Id: Ica152cd1445e797c122e542aa1138232f11c6736
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5e9f3517718f4475c3026acba0a5afb6f19388fa)
netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/NetconfSessionPromise.java