From 2cafcf0d95da1689282d0c4cead0c0e7ca291e13 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 10 Jul 2017 12:28:56 -0400 Subject: [PATCH] Added a timeout on the urllib2 request during a notify event. --- lib/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands.py b/lib/commands.py index 8646a8f8..e0552762 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -646,7 +646,7 @@ class Commands: data = {'address':address, 'status':x.get('result')} try: req = urllib2.Request(URL, json.dumps(data), headers) - response_stream = urllib2.urlopen(req) + response_stream = urllib2.urlopen(req, timeout=5) util.print_error('Got Response for %s' % address) except BaseException as e: util.print_error(str(e))