The ActorSystem.shutdown() method will return a new Shutdown value immediately if another caller has already started the shutdown process but will never invoke the provided afterShutdownCompleted callback:
If the calling code is awaiting for this callback to complete, say as part of a service shutdown hook, then this will result in the application getting stuck awaiting for the callback to be invoked.