From 1771e7879fee3c6de27f96c77719313e7afc2458 Mon Sep 17 00:00:00 2001 From: moneromooo Date: Thu, 15 Jan 2015 11:35:21 +0000 Subject: [PATCH] Make daemon/wallet connections timeout at 20 seconds --- tipbot/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tipbot/utils.py b/tipbot/utils.py index 7484093..9717ba6 100644 --- a/tipbot/utils.py +++ b/tipbot/utils.py @@ -80,7 +80,7 @@ def AmountToString(amount): def SendJSONRPCCommand(host,port,method,params): try: - http = httplib.HTTPConnection(host,port) + http = httplib.HTTPConnection(host,port,timeout=20) except Exception,e: log_error('SendJSONRPCCommand: Error connecting to %s:%u: %s' % (host, port, str(e))) raise @@ -118,7 +118,7 @@ def SendJSONRPCCommand(host,port,method,params): def SendHTMLCommand(host,port,method): try: - http = httplib.HTTPConnection(host,port) + http = httplib.HTTPConnection(host,port,timeout=20) except Exception,e: log_error('SendHTMLCommand: Error connecting to %s:%u: %s' % (host, port, str(e))) raise