aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-08-20 20:24:54 +0100
committerJustin Clark-Casey (justincc)2012-08-20 20:24:54 +0100
commitbcbd450fe441e94d6c0f547055b4e95f75a5b0d0 (patch)
treead92a6256830933073261fe0f715b006fd94c341 /OpenSim/Region/ClientStack/Linden
parentFix scripted detach of temp attachments (diff)
downloadopensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.zip
opensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.tar.gz
opensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.tar.bz2
opensim-SC_OLD-bcbd450fe441e94d6c0f547055b4e95f75a5b0d0.tar.xz
Add --force flag to "kick user" console command to allow bypassing of recent race condition checks.
This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once). You should only attempt --force if a normal kick fails. This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive. This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs14
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()