diff --git a/src/main.c b/src/main.c index 8427a91a..d6a7e469 100644 --- a/src/main.c +++ b/src/main.c @@ -537,6 +537,7 @@ int main(int argc, char** argv) if (terminate != 0) { mslog(&s, NULL, LOG_DEBUG, "termination signal received; waiting for children to die"); kill_children(&clist); + closelog(); while (waitpid(-1, NULL, 0) > 0); exit(0); } diff --git a/src/worker-vpn.c b/src/worker-vpn.c index ab0a47b2..5917a978 100644 --- a/src/worker-vpn.c +++ b/src/worker-vpn.c @@ -901,6 +901,7 @@ exit: if (ws->udp_state == UP_ACTIVE && ws->dtls_session) tls_close(ws->dtls_session); exit_nomsg: + closelog(); exit(1); send_error: