Maemo: Delay UTFS server start a bit.

We have no way to know when the client is actually opening its ports,
so we wait until we are reasonably sure it's done.
This is not 100% safe, but should generally suffice.
(The UTFS server seems to have this logic already built in, but it does
not seem to work on Mac.)
This commit is contained in:
Christian Kandeler
2010-08-26 11:21:41 +02:00
parent a437f824c4
commit 33f6981689
2 changed files with 5 additions and 2 deletions

View File

@@ -258,7 +258,7 @@ void MaemoRemoteMounter::startUtfsClients()
void MaemoRemoteMounter::handleUtfsClientsStarted()
{
if (!m_stop)
startUtfsServers();
QTimer::singleShot(250, this, SLOT(startUtfsServers()));
}
void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus)
@@ -282,6 +282,9 @@ void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus)
void MaemoRemoteMounter::startUtfsServers()
{
if (m_stop)
return;
emit reportProgress(tr("Starting UTFS servers..."));
m_utfsServerTimer->start(30000);
for (int i = 0; i < m_mountSpecs.count(); ++i) {