Run safelyDisconnect() on event loop
The disconnect() operation needs to inform handlers of state
transitions, which should not be delayed. Netty provides indirects these
calls silently on thread mismatch, which we do not want.
Make sure to schedule safelyDisconnect() on the event loop, so that that
it cannot run concurrently with other channel tasks.
JIRA: NETCONF-905
Change-Id: Iffe98db142f9c407fca9f92e5d336a0484ef1eff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f2cf330ae8041264a599b8f8b5652ee54716eb88)
(cherry picked from commit
cd0fe54e116b26fd4778fe68001e3231f76ba9df)