diff --git a/tipbot/config.py.example b/tipbot/config.py.example index fec0fb4..0d8cf2e 100644 --- a/tipbot/config.py.example +++ b/tipbot/config.py.example @@ -28,6 +28,7 @@ payment_confirmations = 6 tipbot_balance_cache_time = 35 # seconds site_game_salt = '' openalias_address = None +rpc_timeout = 180 admins = ["freenode:moneromooo", "freenode:moneromoo"] diff --git a/tipbot/utils.py b/tipbot/utils.py index 8e74e37..30300a2 100644 --- a/tipbot/utils.py +++ b/tipbot/utils.py @@ -215,7 +215,7 @@ def StringToUnits(s): def SendJSONRPCCommand(host,port,method,params): try: - http = httplib.HTTPConnection(host,port,timeout=20) + http = httplib.HTTPConnection(host,port,timeout=config.rpc_timeout) except Exception,e: log_error('SendJSONRPCCommand: Error connecting to %s:%u: %s' % (host, port, str(e))) raise @@ -252,7 +252,7 @@ def SendJSONRPCCommand(host,port,method,params): def SendHTMLCommand(host,port,method): try: - http = httplib.HTTPConnection(host,port,timeout=20) + http = httplib.HTTPConnection(host,port,timeout=config.rpc_timeout) except Exception,e: log_error('SendHTMLCommand: Error connecting to %s:%u: %s' % (host, port, str(e))) raise