diff options
author | UbitUmarov | 2016-07-17 13:20:56 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-17 13:20:56 +0100 |
commit | 442b27222828381a27c7c5eddc967a0de4c82d0a (patch) | |
tree | 039edaa2e0a3485149e529bfb0f5ce014d6c2fc5 /OpenSim/Region/ClientStack | |
parent | identify contexts by ID now avaiable ( pipeline serialization) (diff) | |
download | opensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.zip opensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.tar.gz opensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.tar.bz2 opensim-SC-442b27222828381a27c7c5eddc967a0de4c82d0a.tar.xz |
add a Drop method to PollService Event handlers, Drop requests on connections known to be lost or delay event check if they are sending a response
Diffstat (limited to 'OpenSim/Region/ClientStack')
4 files changed, 22 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index cc614f3..18670f5 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -372,7 +372,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
372 | 372 | ||
373 | caps.RegisterPollHandler( | 373 | caps.RegisterPollHandler( |
374 | "EventQueueGet", | 374 | "EventQueueGet", |
375 | new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, agentID, SERVER_EQ_TIME_NO_EVENTS)); | 375 | new PollServiceEventArgs(null, GenerateEqgCapPath(eventQueueGetUUID), HasEvents, GetEvents, NoEvents, Drop, agentID, SERVER_EQ_TIME_NO_EVENTS)); |
376 | } | 376 | } |
377 | 377 | ||
378 | public bool HasEvents(UUID requestID, UUID agentID) | 378 | public bool HasEvents(UUID requestID, UUID agentID) |
@@ -403,6 +403,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
403 | ev["message"], m_scene.GetScenePresence(agentId).Name, m_scene.Name); | 403 | ev["message"], m_scene.GetScenePresence(agentId).Name, m_scene.Name); |
404 | } | 404 | } |
405 | } | 405 | } |
406 | public void Drop(UUID requestID, UUID pAgentId) | ||
407 | { | ||
408 | // do nothing for now, hope client close will do it | ||
409 | } | ||
406 | 410 | ||
407 | public Hashtable GetEvents(UUID requestID, UUID pAgentId) | 411 | public Hashtable GetEvents(UUID requestID, UUID pAgentId) |
408 | { | 412 | { |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index f66ef57..7831de3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | |||
@@ -226,7 +226,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
226 | private Scene m_scene; | 226 | private Scene m_scene; |
227 | private MeshCapsDataThrottler m_throttler; | 227 | private MeshCapsDataThrottler m_throttler; |
228 | public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) : | 228 | public PollServiceMeshEventArgs(string uri, UUID pId, Scene scene) : |
229 | base(null, uri, null, null, null, pId, int.MaxValue) | 229 | base(null, uri, null, null, null, null, pId, int.MaxValue) |
230 | { | 230 | { |
231 | m_scene = scene; | 231 | m_scene = scene; |
232 | m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId); | 232 | m_throttler = new MeshCapsDataThrottler(100000, 1400000, 10000, scene, pId); |
@@ -241,6 +241,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
241 | 241 | ||
242 | } | 242 | } |
243 | }; | 243 | }; |
244 | |||
245 | Drop= (x, y) => | ||
246 | { | ||
247 | lock (responses) | ||
248 | { | ||
249 | responses.Remove(x); | ||
250 | } | ||
251 | }; | ||
252 | |||
244 | GetEvents = (x, y) => | 253 | GetEvents = (x, y) => |
245 | { | 254 | { |
246 | lock (responses) | 255 | lock (responses) |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 14a59fe..ee7e291 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
222 | private Scene m_scene; | 222 | private Scene m_scene; |
223 | private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); | 223 | private CapsDataThrottler m_throttler = new CapsDataThrottler(100000, 1400000,10000); |
224 | public PollServiceTextureEventArgs(UUID pId, Scene scene) : | 224 | public PollServiceTextureEventArgs(UUID pId, Scene scene) : |
225 | base(null, "", null, null, null, pId, int.MaxValue) | 225 | base(null, "", null, null, null, null, pId, int.MaxValue) |
226 | { | 226 | { |
227 | m_scene = scene; | 227 | m_scene = scene; |
228 | // x is request id, y is userid | 228 | // x is request id, y is userid |
@@ -236,6 +236,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
236 | 236 | ||
237 | } | 237 | } |
238 | }; | 238 | }; |
239 | |||
240 | Drop = (x, y) => { lock (responses) responses.Remove(x); }; | ||
241 | |||
239 | GetEvents = (x, y) => | 242 | GetEvents = (x, y) => |
240 | { | 243 | { |
241 | lock (responses) | 244 | lock (responses) |
@@ -423,7 +426,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
423 | 426 | ||
424 | internal sealed class CapsDataThrottler | 427 | internal sealed class CapsDataThrottler |
425 | { | 428 | { |
426 | |||
427 | private volatile int currenttime = 0; | 429 | private volatile int currenttime = 0; |
428 | private volatile int lastTimeElapsed = 0; | 430 | private volatile int lastTimeElapsed = 0; |
429 | private volatile int BytesSent = 0; | 431 | private volatile int BytesSent = 0; |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index ba4fb76..bde94e6 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -256,11 +256,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
256 | private WebFetchInvDescModule m_module; | 256 | private WebFetchInvDescModule m_module; |
257 | 257 | ||
258 | public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) : | 258 | public PollServiceInventoryEventArgs(WebFetchInvDescModule module, string url, UUID pId) : |
259 | base(null, url, null, null, null, pId, int.MaxValue) | 259 | base(null, url, null, null, null, null, pId, int.MaxValue) |
260 | { | 260 | { |
261 | m_module = module; | 261 | m_module = module; |
262 | 262 | ||
263 | HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); }; | 263 | HasEvents = (x, y) => { lock (responses) return responses.ContainsKey(x); }; |
264 | Drop = (x, y) => { lock (responses) responses.Remove(x); }; | ||
265 | |||
264 | GetEvents = (x, y) => | 266 | GetEvents = (x, y) => |
265 | { | 267 | { |
266 | lock (responses) | 268 | lock (responses) |