master
acetone 2022-11-19 22:32:17 +03:00
parent dc40cac2a0
commit b5e0df61c2
1 changed files with 2 additions and 1 deletions

View File

@ -34,8 +34,10 @@ void terminate(int)
std::cout << "Terminating..." << std::endl;
for (const auto& instanse: g::instanses)
{
instanse.second->terminate();
instanse.first->terminate();
}
std::exit(0);
}
void usage()
@ -185,7 +187,6 @@ int main(int argc, char *argv[])
pi->set3proxyConfigFile(pair.second);
pi->moveToThread(thread);
QObject::connect(thread, &QThread::started, pi, &ProxyInstanse::start);
QObject::connect(thread, &QThread::finished, pi, &ProxyInstanse::deleteLater);
thread->start();
g::instanses.push_back( {thread, pi} );
}