LDEV-5083 Prevent WF from freezing on shutdown because of unclosed Flux Open Fluxes prevent WF from shutting down as they are threads not ma…
Show more
LDEV-5083 Prevent WF from freezing on shutdown because of unclosed FluxOpen Fluxes prevent WF from shutting down as they are threads notmanaged by the server lifecycle.Now we force complete Sinks on Spring context destroy. It closesunderlying Flux threads.The problem is that it occurs when most Spring beans are alreadydestroyed. Fluxes on close want to emit a signal to front endsubscribers. Spring tries to reinitialise controllers which should sendthose signals. It fails as context basically does not exist anymore.All in all we get some harmless errors on server shutdown.The way to avoid would be to have more control over Spring bean destroyorder which does not seem easily achievable.
Show less