summaryrefslogtreecommitdiffstats
path: root/x11vnc/cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/cleanup.c')
-rw-r--r--x11vnc/cleanup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/x11vnc/cleanup.c b/x11vnc/cleanup.c
index e9222b5..4ecef42 100644
--- a/x11vnc/cleanup.c
+++ b/x11vnc/cleanup.c
@@ -165,9 +165,6 @@ void clean_up_exit(int ret) {
ssl_helper_pid(0, 0); /* killall */
}
- if (avahi) {
- avahi_cleanup();
- }
if (ssh_pid > 0) {
kill(ssh_pid, SIGTERM);
ssh_pid = 0;
@@ -242,6 +239,11 @@ void clean_up_exit(int ret) {
rm_flagfile = NULL;
}
+ if (avahi) {
+ avahi_cleanup();
+ fflush(stderr);
+ }
+
exit(ret);
}