flysim: stop the bus runtime under the publisher at shutdown, not the router first
Shutting the router down first raced the last publish and logged a refusal on every clean stop. The publisher ends on its own when the watch sender goes; the edge sees the socket close either way.
This commit is contained in:
parent
3d9a08d0be
commit
d3f98ae4f1
1 changed files with 3 additions and 1 deletions
|
|
@ -184,7 +184,9 @@ pub fn run(config: Config) -> Result<()> {
|
|||
notifier.notify("STOPPING=1\n");
|
||||
drop(sim);
|
||||
if let Some((bus_runtime, bus)) = bus_runtime {
|
||||
bus.router.shutdown();
|
||||
// The publisher ends by itself once the watch sender is gone; stopping the runtime under
|
||||
// it, rather than the router first, keeps a last in-flight publish from being logged as
|
||||
// a refusal. The edge sees the socket close either way.
|
||||
drop(bus);
|
||||
bus_runtime.shutdown_timeout(std::time::Duration::from_secs(1));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue