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