From: Gjergji Date: Tue, 6 Mar 2018 10:10:41 +0000 (+0100) Subject: fix service removal. X-Git-Tag: release-1.1pre16~12 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=fa305d9570bc7350d04c7de66cfec28b9a2f53d1;p=tinc fix service removal. Windows service was not removed until tincctl exits --- diff --git a/src/tincctl.c b/src/tincctl.c index 99f31b83..1ef79419 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -747,7 +747,10 @@ static bool remove_service(void) { fprintf(stderr, "Could not remove %s service: %s\n", identname, winerror(GetLastError())); return false; } - + if(service) + CloseServiceHandle(service); + if(manager) + CloseServiceHandle(manager); fprintf(stderr, "%s service removed\n", identname); return true;