ACR_ServerCommunicator.ACR_ServerCommunicator.UpdateServerExternalAddress C# (CSharp) Method

UpdateServerExternalAddress() private method

This method periodically runs as a DelayCommand continuation. Its purpose is to refresh the database's view of our network address, so that server-to-server portals still function if the external address changes without a server process restart.
private UpdateServerExternalAddress ( ) : void
return void
        private void UpdateServerExternalAddress()
        {
            //
            // Queue a work item to the thread pool for determining the server
            // external address, and then set up for another continuation.
            //
            // Later on, the command dispatch loop will notice that a new
            // external hostname has been set, and will update the database as
            // appropriate.
            //

            ThreadPool.QueueUserWorkItem(delegate(object state)
            {
                try
                {
                    string Hostname = ALFA.WebServices.GetExternalHostname(WorldManager.Configuration.GetHostnameUrl);

                    lock (ExternalHostnameLock)
                    {
                        ExternalHostname = Hostname;
                    }
                }
                catch (Exception e)
                {
                    WriteTimestampedLogEntry(String.Format("ACR_ServerCommunicator.UpdateServerExternalAddress(): Encountered exception: {0}", e));
                }
            });

            DelayCommand(UPDATE_SERVER_EXTERNAL_ADDRESS_INTERVAL, delegate()
            {
                UpdateServerExternalAddress();
            });
        }
ACR_ServerCommunicator