Close listener with
listener.Close()to stop Accepting new application/service connections.
ExecuteTask()API by immediately returning every request with “shutting down” error. This way, already connected services cannot receive new execution requests with
ListenTask(). (This error can be applied to incoming
ListenTask()requests for convenience.)
stopRunningServices()to send shutdown signals to running services. So, connected services will gracefully shutdown by finishing ongoing tasks and sending
SubmitResult()s to Core.
Drain pubsub queue by sending results for open
ListenResult()streams. So, applications will receive their last results. Relevant lines.
service.Close()afterwards to close all connections for all clients.