diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index cd70410..d604cf6 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ClientStack.Linden.Tests | |||
94 | UUID spId = TestHelpers.ParseTail(0x1); | 94 | UUID spId = TestHelpers.ParseTail(0x1); |
95 | 95 | ||
96 | SceneHelpers.AddScenePresence(m_scene, spId); | 96 | SceneHelpers.AddScenePresence(m_scene, spId); |
97 | m_scene.IncomingCloseAgent(spId); | 97 | m_scene.IncomingCloseAgent(spId, false); |
98 | 98 | ||
99 | // TODO: Add more assertions for the other aspects of event queues | 99 | // TODO: Add more assertions for the other aspects of event queues |
100 | Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0)); | 100 | Assert.That(MainServer.Instance.GetPollServiceHandlerKeys().Count, Is.EqualTo(0)); |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 22b3d35..148d0e0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -487,16 +487,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
487 | 487 | ||
488 | #region Client Methods | 488 | #region Client Methods |
489 | 489 | ||
490 | /// <summary> | ||
491 | /// Close down the client view | ||
492 | /// </summary> | ||
493 | public void Close() | 490 | public void Close() |
494 | { | 491 | { |
492 | Close(false); | ||
493 | } | ||
494 | |||
495 | public void Close(bool force) | ||
496 | { | ||
495 | // We lock here to prevent race conditions between two threads calling close simultaneously (e.g. | 497 | // We lock here to prevent race conditions between two threads calling close simultaneously (e.g. |
496 | // a simultaneous relog just as a client is being closed out due to no packet ack from the old connection. | 498 | // a simultaneous relog just as a client is being closed out due to no packet ack from the old connection. |
497 | lock (CloseSyncLock) | 499 | lock (CloseSyncLock) |
498 | { | 500 | { |
499 | if (!IsActive) | 501 | // We still perform a force close inside the sync lock since this is intended to attempt close where |
502 | // there is some unidentified connection problem, not where we have issues due to deadlock | ||
503 | if (!IsActive && !force) | ||
500 | return; | 504 | return; |
501 | 505 | ||
502 | IsActive = false; | 506 | IsActive = false; |
@@ -11989,7 +11993,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11989 | { | 11993 | { |
11990 | Kick(reason); | 11994 | Kick(reason); |
11991 | Thread.Sleep(1000); | 11995 | Thread.Sleep(1000); |
11992 | Close(); | 11996 | Disconnect(); |
11993 | } | 11997 | } |
11994 | 11998 | ||
11995 | public void Disconnect() | 11999 | public void Disconnect() |