From: Ondrej Lichtner <olichtne(a)redhat.com>
The sockets should be properly closed after the availability of the
lnst-slave is checked. This adds the relevant calls.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/SlavePool.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py
index 24a21d8..e825998 100644
--- a/lnst/Controller/SlavePool.py
+++ b/lnst/Controller/SlavePool.py
@@ -103,9 +103,12 @@ class SlavePool:
m_id = check_sockets[s]
if err == 0:
pool[m_id]["available"] = True
+ s.shutdown(socket.SHUT_RDWR)
+ s.close()
del check_sockets[s]
else:
pool[m_id]["available"] = False
+ s.close()
del check_sockets[s]
else:
for m_id in pool.keys():
--
2.7.2