[AS7-6816]:Minor update to fix deploymentManager and modelControllerClie...

...nt are only closed if uniqueName != null