aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index d636b1c..62500a2 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -1208,10 +1208,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
1208 if (homeScene.TryGetAvatar(avatarId,out avatar)) 1208 if (homeScene.TryGetAvatar(avatarId,out avatar))
1209 { 1209 {
1210 KillAUser ku = new KillAUser(avatar,mod); 1210 KillAUser ku = new KillAUser(avatar,mod);
1211 Thread ta = new Thread(ku.ShutdownNoLogout); 1211 Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true);
1212 ta.IsBackground = true;
1213 ta.Name = "ShutdownThread";
1214 ta.Start();
1215 } 1212 }
1216 } 1213 }
1217 1214
@@ -1261,7 +1258,13 @@ namespace OpenSim.Region.CoreModules.InterGrid
1261 1258
1262 avToBeKilled.ControllingClient.SendLogoutPacketWhenClosing = false; 1259 avToBeKilled.ControllingClient.SendLogoutPacketWhenClosing = false;
1263 1260
1264 Thread.Sleep(30000); 1261 int sleepMS = 30000;
1262 while (sleepMS > 0)
1263 {
1264 Watchdog.UpdateThread();
1265 Thread.Sleep(1000);
1266 sleepMS -= 1000;
1267 }
1265 1268
1266 // test for child agent because they might have come back 1269 // test for child agent because they might have come back
1267 if (avToBeKilled.IsChildAgent) 1270 if (avToBeKilled.IsChildAgent)
@@ -1270,6 +1273,8 @@ namespace OpenSim.Region.CoreModules.InterGrid
1270 avToBeKilled.ControllingClient.Close(); 1273 avToBeKilled.ControllingClient.Close();
1271 } 1274 }
1272 } 1275 }
1276
1277 Watchdog.RemoveThread();
1273 } 1278 }
1274 1279
1275 } 1280 }