From 310642666f666c80417c1bf01514102d9f0a0674 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 2 Feb 2013 05:08:16 +0000 Subject: Fix potential deadlock on exit. Maybe. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5020 a436a847-0d15-0410-975c-d299462d15a1 --- src/socket/SocketListener.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/socket') diff --git a/src/socket/SocketListener.cpp b/src/socket/SocketListener.cpp index 4e1f9512..55c2de37 100644 --- a/src/socket/SocketListener.cpp +++ b/src/socket/SocketListener.cpp @@ -69,9 +69,9 @@ SocketListener::~SocketListener() _exit_flag = true; _unix_sock.shutdown(); _net_sock.shutdown(); - join(); _unix_sock.close(); _net_sock.close(); + join(); unlink(_unix_path.c_str()); } @@ -97,7 +97,7 @@ SocketListener::_run() while (true) { // Wait for input to arrive at a socket - int ret = poll(pfds, nfds, -1); + const int ret = poll(pfds, nfds, -1); if (_exit_flag) { break; } else if (ret == -1) { -- cgit v1.2.1