Closed open in check_socket_listening
@@ -507,6 +507,8 @@ def check_socket_listening(itf, timeout=60):
sock.close()
return True
except socket.error:
+ if sock:
+ sock.close()
# Try again in another 200ms
time.sleep(.2)
continue
