tomaszmrugalski/dibbler — pull request #19 by hernancmartinez (2014-02-12 02:36:25+00:00)
Title: Client at MMC does not send Release

Fix to bug http://klub.com.pl/bugzilla3/show_bug.cgi?id=162

Removed pService->SetStatus(SERVICE_STOPPED) from TWinService::Handler. This was causing the main thread to end before ServiceMain() , which runs in another thread, to return gracefully. It was leading to interfaces not releasing their addresses.

The call to pService->SetStatus(SERVICE_STOPPED) in WinService.cpp:78 as the last call in ServiceMain() will do the right job of notifing the Windows service manager and lead to a proper return of StartServiceCtrlDispatcher() in WinService.cpp:257