예제 #1
0
        internal void Shutdown()
        {
            if (shuttingDown)
            {
                return;
            }

            shuttingDown = true;
            serverThread.Join();
            server.Shutdown();

            //lock( functionsGate )
            //{
            functions.Clear();
            //}

            //ROS.Debug()( $"[{ThisNode.Name}] XmlRpc Server shutted down." );
        }
예제 #2
0
        public void Dispose()
        {
            lock (gate)
            {
                if (disposed)
                {
                    return;
                }
                disposed = true;
            }

            serverThread.Join();
            server.Shutdown();

            lock (gate)
            {
                functions.Clear();
            }

            logger.LogDebug("XmlRpc Server shut down.");
        }
예제 #3
0
 internal void shutdown()
 {
     if (shutting_down)
     {
         return;
     }
     shutting_down = true;
     server_thread.Join();
     server.Shutdown();
     foreach (CachedXmlRpcClient c in clients)
     {
         for (int wait_count = 0; c.in_use && wait_count < 10; wait_count++)
         {
             Thread.Sleep(10);
         }
         c.client.Shutdown();
     }
     clients.Clear();
     lock (functions_mutex)
     {
         functions.Clear();
     }
     foreach (AsyncXmlRpcConnection ass in connections)
     {
         ass.removeFromDispatch(server.Dispatch);
     }
     connections.Clear();
     lock (added_connections_mutex)
     {
         added_connections.Clear();
     }
     lock (removed_connections_mutex)
     {
         removed_connections.Clear();
     }
 }