aboutsummaryrefslogtreecommitdiff
path: root/jobs/TCPServerChecker.py
diff options
context:
space:
mode:
authorTom <tom@ritter.vg>2016-09-14 11:59:47 -0500
committerTom <tom@ritter.vg>2016-09-14 11:59:47 -0500
commita90d07cfb3923a38edcb3fc1f8b61ad750f72a9b (patch)
tree69946107720e99e948bd1cf7ba65c7f6a9bcb7d9 /jobs/TCPServerChecker.py
parent4426633a8120926f05ee8818c22d962f76f99a69 (diff)
Set a timeout on socket connections
Diffstat (limited to 'jobs/TCPServerChecker.py')
-rwxr-xr-xjobs/TCPServerChecker.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/jobs/TCPServerChecker.py b/jobs/TCPServerChecker.py
index eaf6704..78ae1ac 100755
--- a/jobs/TCPServerChecker.py
+++ b/jobs/TCPServerChecker.py
@@ -31,6 +31,7 @@ class TCPServerChecker(JobSpawner.JobSpawner):
def execute(self):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ s.settimeout(5)
s.connect((self.ip, self.port))
s.close()
return True