Eliminate exceptions caused by RuntimeServiceFactory.UnloadServices

There are some unhandled exceptions thrown when running the method RuntimeServiceFactory.UnloadServices. This happens for example during the WorkQueueIntegrationTests run.

The problem is caused by timers running in some of the services. Handlers of these timers call the ServiceManager.Services.GetService method which may or may not return null depending on how fast the handler runs and when it was started.

The solution would be to wait for all the timers to stop and only then unload the services.


Open Project and close it immediately.

The error above cannot be reproduced. Probably tested on the wrong branch.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.