Reap final-session coordinator before returning
This commit is contained in:
parent
81b4928f16
commit
2df810f125
1 changed files with 13 additions and 3 deletions
|
|
@ -423,12 +423,22 @@ impl ClientBackend for CoordinatorClientBackend {
|
||||||
execute_over_control_face_as(&endpoint, argv, stdout, stderr, &self.identity)?
|
execute_over_control_face_as(&endpoint, argv, stdout, stderr, &self.identity)?
|
||||||
};
|
};
|
||||||
self.bootstrap_owner.take();
|
self.bootstrap_owner.take();
|
||||||
if let Some(coordinator) = self.coordinator.take()
|
let reap_coordinator = if let Some(coordinator) = self.coordinator.as_ref() {
|
||||||
&& coordinator
|
!matches!(
|
||||||
|
self.discover().map_err(ClientError::Backend)?,
|
||||||
|
Discovery::Ready(_)
|
||||||
|
) || coordinator
|
||||||
.has_exited()
|
.has_exited()
|
||||||
.map_err(failure)
|
.map_err(failure)
|
||||||
.map_err(ClientError::Backend)?
|
.map_err(ClientError::Backend)?
|
||||||
{
|
} else {
|
||||||
|
false
|
||||||
|
};
|
||||||
|
if reap_coordinator {
|
||||||
|
let coordinator = self
|
||||||
|
.coordinator
|
||||||
|
.take()
|
||||||
|
.expect("checked coordinator remains present");
|
||||||
let status = coordinator
|
let status = coordinator
|
||||||
.reap()
|
.reap()
|
||||||
.map_err(failure)
|
.map_err(failure)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue