Make RPC timeout configurable, and longer by default

master
moneromooo 7 years ago
parent da965ebc69
commit ab6a2d60eb

@ -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"]

@ -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

Loading…
Cancel
Save