diff --git a/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGrid.Framework.Manager/GridServerManager.cs index c536e33176..5c39cc1aab 100644 --- a/OpenGrid.Framework.Manager/GridServerManager.cs +++ b/OpenGrid.Framework.Manager/GridServerManager.cs @@ -2,7 +2,7 @@ using System; using System.Collections; using System.Collections.Generic; using Nwc.XmlRpc; - +using System.Threading; namespace OpenGrid.Framework.Manager { @@ -19,18 +19,21 @@ namespace OpenGrid.Framework.Manager { Hashtable requestData = (Hashtable)request.Params[0]; Hashtable responseData = new Hashtable(); - if((string)requestData["authkey"] != recvkey) { - responseData["error"]="INVALID KEY"; - } else { - responseData["msg"]="Shutdown command accepted"; - responseData["authkey"]=sendkey; - thecallback("shutdown"); - } - + responseData["msg"]="Shutdown command accepted"; + (new Thread(new ThreadStart(ZOMGServerIsNowTerminallyIll))).Start(); response.Value = responseData; return response; } + + // Brought to by late-night coding + public static void ZOMGServerIsNowTerminallyIll() + { + Console.WriteLine("ZOMG! THIS SERVER IS TERMINALLY ILL - WE GOT A SHUTDOWN REQUEST FROM A GRID MANAGER!!!!"); + Console.WriteLine("We have 3 seconds to live..."); + Thread.Sleep(3000); + thecallback("shutdown"); + } } }