Close service if setId failed
Merge pull request #1178 from jburel/close-service-develop

Close service if setId failed