internal void Shutdown() { if (shuttingDown) { return; } shuttingDown = true; serverThread.Join(); server.Shutdown(); //lock( functionsGate ) //{ functions.Clear(); //} //ROS.Debug()( $"[{ThisNode.Name}] XmlRpc Server shutted down." ); }
public void Dispose() { lock (gate) { if (disposed) { return; } disposed = true; } serverThread.Join(); server.Shutdown(); lock (gate) { functions.Clear(); } logger.LogDebug("XmlRpc Server shut down."); }
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(); } }