aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs14
1 files changed, 9 insertions, 5 deletions
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()