aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Åstrand (astrand) <astrand@cendio.se>2018-09-25 13:51:55 +0200
committerPeter Åstrand (astrand) <astrand@cendio.se>2018-10-23 13:17:49 +0200
commit454d44456f46e30ea2397078ea0b55afd39c3219 (patch)
tree7b41e465247937e84fa78d95f684e7a8cf2c1ad4
parent20041a2924eb19470e1780c6c07ed594f3f9f614 (diff)
downloadtigervnc-454d44456f46e30ea2397078ea0b55afd39c3219.tar.gz
tigervnc-454d44456f46e30ea2397078ea0b55afd39c3219.zip
Run listener destructors before terminating
Must be done in order to remove UNIX sockets etc.
-rw-r--r--unix/x0vncserver/x0vncserver.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index c08572be..d0d4be86 100644
--- a/unix/x0vncserver/x0vncserver.cxx
+++ b/unix/x0vncserver/x0vncserver.cxx
@@ -439,6 +439,13 @@ int main(int argc, char** argv)
TXWindow::handleXEvents(dpy);
+ // Run listener destructors; remove UNIX sockets etc
+ for (std::list<SocketListener*>::iterator i = listeners.begin();
+ i != listeners.end();
+ i++) {
+ delete *i;
+ }
+
vlog.info("Terminated");
return 0;
}