Make daemon/wallet connections timeout at 20 seconds

This commit is contained in:
moneromooo 2015-01-15 11:35:21 +00:00
parent cf05473c2c
commit 1771e7879f

View file

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