improved Tor startup phase integration in TorControlDialog

This commit is contained in:
csoler 2017-12-28 21:39:35 +01:00
parent 475b6a4a62
commit a591001cec
4 changed files with 61 additions and 30 deletions

View file

@ -363,16 +363,16 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
TorControlDialog tcd(torManager) ;
tcd.show();
while(tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK) // runs until some status is reached: either tor works, or it fails.
{
QCoreApplication::processEvents();
usleep(0.2*1000*1000) ;
}
for(uint32_t i=0;i<10;++i) // give some time (2 secs) to see what's going on
while(tcd.checkForTor() != TorControlDialog::TOR_STATUS_OK || tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK) // runs until some status is reached: either tor works, or it fails.
{
QCoreApplication::processEvents();
usleep(0.2*1000*1000) ;
}
// for(uint32_t i=0;i<10;++i) // give some time (2 secs) to see what's going on
// {
// QCoreApplication::processEvents();
// usleep(0.2*1000*1000) ;
// }
tcd.hide();