mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2025-07-02 15:55:40 +00:00
Remove port forwarding entries when MISS is stopped
This commit is contained in:
parent
15d60ed10a
commit
83c4413926
@ -628,6 +628,14 @@ HandlerEx(DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpConte
|
|||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
|
|
||||||
case SERVICE_CONTROL_STOP:
|
case SERVICE_CONTROL_STOP:
|
||||||
|
ServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
|
||||||
|
ServiceStatus.dwControlsAccepted = 0;
|
||||||
|
SetServiceStatus(ServiceStatusHandle, &ServiceStatus);
|
||||||
|
|
||||||
|
printf("Removing UPnP/NAT-PMP rules after service stop request\n");
|
||||||
|
UpdatePortMappings(false);
|
||||||
|
|
||||||
|
printf("The service is stopping\n");
|
||||||
ServiceStatus.dwCurrentState = SERVICE_STOPPED;
|
ServiceStatus.dwCurrentState = SERVICE_STOPPED;
|
||||||
SetServiceStatus(ServiceStatusHandle, &ServiceStatus);
|
SetServiceStatus(ServiceStatusHandle, &ServiceStatus);
|
||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user