diff options
author | UbitUmarov | 2016-12-30 01:52:02 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-30 01:52:02 +0000 |
commit | 2a01173715e8adc9ea2f263221aed1302ed7675f (patch) | |
tree | 116300a1eebe09421da112635be883196f2b41f0 /OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |
parent | Merge branch 'master' into httptests (diff) | |
parent | Serving robots.txt from bin Idea of solution for http://opensimulator.org/man... (diff) | |
download | opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.zip opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.tar.gz opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.tar.bz2 opensim-SC-2a01173715e8adc9ea2f263221aed1302ed7675f.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index d80e660..2ddd7a2 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs | |||
@@ -54,6 +54,8 @@ namespace OpenSim.Services.Connectors | |||
54 | 54 | ||
55 | private string m_ServerURI = String.Empty; | 55 | private string m_ServerURI = String.Empty; |
56 | 56 | ||
57 | private int m_maxRetries = 0; | ||
58 | |||
57 | /// <summary> | 59 | /// <summary> |
58 | /// Timeout for remote requests. | 60 | /// Timeout for remote requests. |
59 | /// </summary> | 61 | /// </summary> |
@@ -100,6 +102,7 @@ namespace OpenSim.Services.Connectors | |||
100 | m_ServerURI = serviceURI; | 102 | m_ServerURI = serviceURI; |
101 | 103 | ||
102 | m_requestTimeoutSecs = config.GetInt("RemoteRequestTimeout", m_requestTimeoutSecs); | 104 | m_requestTimeoutSecs = config.GetInt("RemoteRequestTimeout", m_requestTimeoutSecs); |
105 | m_maxRetries = config.GetInt("MaxRetries", m_maxRetries); | ||
103 | 106 | ||
104 | StatsManager.RegisterStat( | 107 | StatsManager.RegisterStat( |
105 | new Stat( | 108 | new Stat( |
@@ -700,10 +703,20 @@ namespace OpenSim.Services.Connectors | |||
700 | 703 | ||
701 | RequestsMade++; | 704 | RequestsMade++; |
702 | 705 | ||
703 | string reply | 706 | string reply = String.Empty; |
704 | = SynchronousRestFormsRequester.MakeRequest( | 707 | int retries = 0; |
708 | |||
709 | do | ||
710 | { | ||
711 | reply = SynchronousRestFormsRequester.MakeRequest( | ||
705 | "POST", m_ServerURI + "/xinventory", | 712 | "POST", m_ServerURI + "/xinventory", |
706 | ServerUtils.BuildQueryString(sendData), m_requestTimeoutSecs, m_Auth); | 713 | ServerUtils.BuildQueryString(sendData), m_requestTimeoutSecs, m_Auth); |
714 | |||
715 | if (reply != String.Empty) | ||
716 | break; | ||
717 | |||
718 | retries++; | ||
719 | } while (retries <= m_maxRetries); | ||
707 | 720 | ||
708 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( | 721 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse( |
709 | reply); | 722 | reply); |