We should not be completing futures while holding locks, as that can
lead to deadlocks. Move completion to once we have released to lock.
JIRA: NETCONF-924
Change-Id: Ic75e953bafa0b15372588a9f5c79c9436a876002
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
}
remoteDevice.onRemoteSessionUp(netconfSessionPreferences, this);
- if (!firstConnectionFuture.isDone()) {
- // FIXME: right, except ... this does not include the device schema setup, so is it really useful?
- firstConnectionFuture.set(Empty.value());
- }
} finally {
sessionLock.unlock();
}
+
+ // FIXME: right, except ... this does not include the device schema setup, so is it really useful?
+ if (!firstConnectionFuture.set(Empty.value())) {
+ LOG.trace("{}: First connection already completed", id);
+ }
}
/**