Clean up command sockets on stop
This helps to avoid leaking domain sockets on the filesystem. Change-Id: I767d66d1cee5e89e2f3c63158bc0cabfa2dd807e Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
6bb3f9d9ea
commit
8f4f827ed3
|
@ -55,6 +55,9 @@ class CommandSocket(object):
|
|||
# re-entering their loop.
|
||||
self.queue.put(b'_stop')
|
||||
self.socket_thread.join()
|
||||
self.socket.close()
|
||||
if os.path.exists(self.path):
|
||||
os.unlink(self.path)
|
||||
|
||||
def _socketListener(self):
|
||||
while self.running:
|
||||
|
|
Loading…
Reference in New Issue