summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/anytun.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index da2f7f6..088b7ad 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -467,6 +467,18 @@ int main(int argc, char* argv[])
disableRouting=true;
}
#endif
+
+#ifndef ANYTUN_NOSYNC
+ boost::thread * syncListenerThread;
+ if(gOpt.getLocalSyncPort() != "")
+ syncListenerThread = new boost::thread(boost::bind(syncListener));
+
+ std::list<boost::thread *> connectThreads;
+ for(HostList::const_iterator it = connect_to.begin() ;it != connect_to.end(); ++it) {
+ connectThreads.push_back(new boost::thread(boost::bind(syncConnector, *it)));
+ }
+#endif
+
#ifndef NO_DAEMON
if(gOpt.getChrootDir() != "")
do_chroot(gOpt.getChrootDir());
@@ -489,16 +501,6 @@ int main(int argc, char* argv[])
#if defined(WIN_SERVICE) || !defined(NO_SIGNALCONTROLLER)
boost::thread receiverThread(boost::bind(receiver, &dev, src));
#endif
-#ifndef ANYTUN_NOSYNC
- boost::thread * syncListenerThread;
- if(gOpt.getLocalSyncPort() != "")
- syncListenerThread = new boost::thread(boost::bind(syncListener));
-
- std::list<boost::thread *> connectThreads;
- for(HostList::const_iterator it = connect_to.begin() ;it != connect_to.end(); ++it) {
- connectThreads.push_back(new boost::thread(boost::bind(syncConnector, *it)));
- }
-#endif
#if defined(WIN_SERVICE)
int ret = 0;