summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Belanger <pabelanger@redhat.com>2019-01-07 10:02:33 -0500
committerPaul Belanger <pabelanger@redhat.com>2019-01-07 10:02:33 -0500
commit8f4f827ed3817c35ea17462277ccf3628103e811 (patch)
treee8b01340217ceab7608275346c4e82c64864db5a
parent6bb3f9d9eaa353ec5d811e4488248ecd64bac428 (diff)
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>
Notes
Notes (review): Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 09 Jan 2019 14:40:34 +0000 Reviewed-on: https://review.openstack.org/628990 Project: openstack-infra/zuul Branch: refs/heads/master
-rw-r--r--zuul/lib/commandsocket.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/zuul/lib/commandsocket.py b/zuul/lib/commandsocket.py
index 2836999..96dddb6 100644
--- a/zuul/lib/commandsocket.py
+++ b/zuul/lib/commandsocket.py
@@ -55,6 +55,9 @@ class CommandSocket(object):
55 # re-entering their loop. 55 # re-entering their loop.
56 self.queue.put(b'_stop') 56 self.queue.put(b'_stop')
57 self.socket_thread.join() 57 self.socket_thread.join()
58 self.socket.close()
59 if os.path.exists(self.path):
60 os.unlink(self.path)
58 61
59 def _socketListener(self): 62 def _socketListener(self):
60 while self.running: 63 while self.running: