fix thread contention issues and VS crash on domain server shutdown and restart
removed dead comment
Merge pull request #1215 from ZappoMan/bugfixes

fix thread contention issues and VS crash on domain server shutdown and restart