]> git.sesse.net Git - cubemap/commitdiff
Do not start the servers until all the deserialized clients have been put back. Fixes...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Apr 2013 18:10:49 +0000 (20:10 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 14 Apr 2013 18:10:49 +0000 (20:10 +0200)
main.cpp

index 95a72b83f00440bf92b612a30bdbba208329d9f7..64cab64f40c7def8dd7ce744d29b2cd95a9fbef1 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -303,8 +303,6 @@ start:
        // Find all streams in the configuration file, and create them.
        create_streams(config, deserialized_stream_ids, &deserialized_inputs);
 
-       servers->run();
-
        vector<Acceptor *> acceptors = create_acceptors(config, &deserialized_acceptors);
        vector<Input *> inputs = create_inputs(config, &deserialized_inputs);
        
@@ -317,6 +315,8 @@ start:
        for (int i = 0; i < loaded_state.clients_size(); ++i) {
                servers->add_client_from_serialized(loaded_state.clients(i));
        }
+       
+       servers->run();
 
        // Start writing statistics.
        StatsThread *stats_thread = NULL;