Initiate worker thread after initializing libtorrent to ensure logging is properly done.

This commit is contained in:
rakshasa
2012-03-20 23:52:32 +09:00
parent 2c72c31e1c
commit ece90f975b
+3 -3
View File
@@ -188,9 +188,6 @@ main(int argc, char** argv) {
control = new Control;
worker_thread = new ThreadWorker();
worker_thread->init_thread();
srandom(cachedTime.usec());
srand48(cachedTime.usec());
@@ -217,6 +214,9 @@ main(int argc, char** argv) {
torrent::main_thread()->slot_do_work() = tr1::bind(&client_perform);
torrent::main_thread()->slot_next_timeout() = tr1::bind(&client_next_timeout, control);
worker_thread = new ThreadWorker();
worker_thread->init_thread();
// Initialize option handlers after libtorrent to ensure
// torrent::ConnectionManager* are valid etc.
initialize_commands();