In SynchronousRestObjectRequester.MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections) actually set timeout on WebRequest if given.

Previously, we were doing nothing with this parameter.
No effect on current code since none of the 6 callers attempt to use the timeout.
bullet-2.82
Justin Clark-Casey (justincc) 2014-05-12 19:20:00 +01:00
parent bf8f64e40e
commit faf9ba53fc
1 changed files with 2 additions and 0 deletions

View File

@ -1116,6 +1116,8 @@ namespace OpenSim.Framework
WebRequest request = WebRequest.Create(requestUrl); WebRequest request = WebRequest.Create(requestUrl);
HttpWebRequest ht = (HttpWebRequest)request; HttpWebRequest ht = (HttpWebRequest)request;
ht.Timeout = pTimeout;
if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections) if (maxConnections > 0 && ht.ServicePoint.ConnectionLimit < maxConnections)
ht.ServicePoint.ConnectionLimit = maxConnections; ht.ServicePoint.ConnectionLimit = maxConnections;