+
+void Server::process_queued_data()
+{
+ MutexLock lock(&queued_data_mutex);
+
+ for (size_t i = 0; i < queued_add_clients.size(); ++i) {
+ add_client(queued_add_clients[i]);
+ }
+ queued_add_clients.clear();
+
+ for (map<string, string>::iterator queued_it = queued_data.begin();
+ queued_it != queued_data.end();
+ ++queued_it) {
+ add_data(queued_it->first, queued_it->second.data(), queued_it->second.size());
+ }
+ queued_data.clear();
+}