diff options
author | UbitUmarov | 2018-11-07 05:11:36 +0000 |
---|---|---|
committer | UbitUmarov | 2018-11-07 05:11:36 +0000 |
commit | afd3852a36316d188423320ba8435c884b7f7f9a (patch) | |
tree | b333dbd2276b69a116b715d0511b718b8035eaf6 /OpenSim/Region | |
parent | remove some fire and forget methods missed file (diff) | |
download | opensim-SC-afd3852a36316d188423320ba8435c884b7f7f9a.zip opensim-SC-afd3852a36316d188423320ba8435c884b7f7f9a.tar.gz opensim-SC-afd3852a36316d188423320ba8435c884b7f7f9a.tar.bz2 opensim-SC-afd3852a36316d188423320ba8435c884b7f7f9a.tar.xz |
change region gettexture response if presence not found
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 0588648..87e23de 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -241,15 +241,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
241 | 241 | ||
242 | lock (responses) | 242 | lock (responses) |
243 | { | 243 | { |
244 | if (responses.Count > 0) | 244 | if (responses.Count > 0 && m_queue.Count > 32) |
245 | { | 245 | reqinfo.send503 = true; |
246 | if (m_queue.Count >= 4) | ||
247 | { | ||
248 | // Never allow more than 4 fetches to wait | ||
249 | reqinfo.send503 = true; | ||
250 | } | ||
251 | } | ||
252 | } | 246 | } |
247 | |||
253 | m_queue.Add(reqinfo); | 248 | m_queue.Add(reqinfo); |
254 | }; | 249 | }; |
255 | 250 | ||
@@ -266,7 +261,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
266 | Hashtable response = new Hashtable(); | 261 | Hashtable response = new Hashtable(); |
267 | 262 | ||
268 | response["int_response_code"] = 500; | 263 | response["int_response_code"] = 500; |
269 | response["str_response_string"] = "Script timeout"; | 264 | response["str_response_string"] = "timeout"; |
270 | response["content_type"] = "text/plain"; | 265 | response["content_type"] = "text/plain"; |
271 | response["keepalive"] = false; | 266 | response["keepalive"] = false; |
272 | return response; | 267 | return response; |
@@ -293,6 +288,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
293 | } | 288 | } |
294 | } | 289 | } |
295 | 290 | ||
291 | if (m_presence == null) | ||
292 | m_presence = m_scene.GetScenePresence(Id); | ||
293 | |||
294 | if (m_presence == null || m_presence.IsDeleted) | ||
295 | requestinfo.send503 = true; | ||
296 | |||
296 | if (requestinfo.send503) | 297 | if (requestinfo.send503) |
297 | { | 298 | { |
298 | response = new Hashtable(); | 299 | response = new Hashtable(); |
@@ -303,26 +304,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
303 | response["keepalive"] = false; | 304 | response["keepalive"] = false; |
304 | 305 | ||
305 | Hashtable headers = new Hashtable(); | 306 | Hashtable headers = new Hashtable(); |
306 | headers["Retry-After"] = 30; | 307 | headers["Retry-After"] = 20; |
307 | response["headers"] = headers; | 308 | response["headers"] = headers; |
308 | 309 | ||
309 | responses[requestID] = new APollResponse() {bytes = 0, response = response}; | 310 | responses[requestID] = new APollResponse() { bytes = 0, response = response }; |
310 | |||
311 | return; | ||
312 | } | ||
313 | |||
314 | // If the avatar is gone, don't bother to get the texture | ||
315 | if (m_scene.GetScenePresence(Id) == null) | ||
316 | { | ||
317 | response = new Hashtable(); | ||
318 | |||
319 | response["int_response_code"] = 500; | ||
320 | response["str_response_string"] = "Script timeout"; | ||
321 | response["content_type"] = "text/plain"; | ||
322 | response["keepalive"] = false; | ||
323 | |||
324 | responses[requestID] = new APollResponse() {bytes = 0, response = response}; | ||
325 | |||
326 | return; | 311 | return; |
327 | } | 312 | } |
328 | } | 313 | } |