mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
improved Tor startup phase integration in TorControlDialog
This commit is contained in:
parent
475b6a4a62
commit
a591001cec
4 changed files with 61 additions and 30 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue