From 20eaf50791c507c29f4b2eded48523ab8f9fe1bb Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 8 Dec 2013 01:49:18 +0100 Subject: [PATCH] Shut down socket connections properly after testing... --- cstatsd/stats-ports.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cstatsd/stats-ports.py b/cstatsd/stats-ports.py index b503bc1..e3de680 100644 --- a/cstatsd/stats-ports.py +++ b/cstatsd/stats-ports.py @@ -20,6 +20,7 @@ while True: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(0.5) s.connect(("127.0.0.1", port)) + s.shutdown(socket.SHUT_RDWR) s.close() up = True except socket.error, e: