[X2Go-Commits] [x2goclient] 226/281: src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise maximum startup time to 5 seconds and break out early, if the process went into running state earlier.
git-admin at x2go.org
git-admin at x2go.org
Thu Jan 19 13:06:03 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit cc19d5c45af8ec951747ebb6e2279282fe796da0
Author: Mihai Moldovan <ionic at ionic.de>
Date: Fri Sep 23 08:00:19 2016 +0200
src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise maximum startup time to 5 seconds and break out early, if the process went into running state earlier.
---
debian/changelog | 3 +++
src/onmainwindow.cpp | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index c7ec333..a9e0f8a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -426,6 +426,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
and code related to non-user-mode-sshd setups. Simplifies code a bit and
we want to always start a user-mode OpenSSH server anyway. Also get rid
of the clientport variable that is now unnecessary.
+ - src/onmainwindow.cpp: when starting sshd on Unix-based plattforms, raise
+ maximum startup time to 5 seconds and break out early, if the process
+ went into running state earlier.
[ Bernard Cafarelli ]
* New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index eff2467..fa67971 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10513,9 +10513,13 @@ bool ONMainWindow::startSshd()
sshd->start (binary, arguments);
#endif /* defined (Q_OS_WIN) */
- // Allow sshd a grace time of 3 seconds to come up.
- QTime sleepTime = QTime::currentTime ().addSecs (3);
+ // Allow sshd a grace time of 5 seconds to come up.
+ QTime sleepTime = QTime::currentTime ().addSecs (5);
while (QTime::currentTime () < sleepTime) {
+ if (QProcess::Running == sshd->state ()) {
+ break;
+ }
+
QCoreApplication::processEvents (QEventLoop::AllEvents, 100);
}
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list