This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goclient.

commit c29e3db05cbb1c7e6782d380c4560391382dea78
Author: Oleksandr Shneyder <o.shney...@phoca-gmbh.de>
Date:   Fri Nov 5 09:35:15 2021 -0600

    Improve synchronisation in broker mode.
---
 debian/changelog     |  1 +
 src/onmainwindow.cpp | 38 +++++++++++++++++++++++++++++++++++---
 2 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 175e5e6..5d10ed9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,7 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
     - Improve view modes in broker mode.
     - Set toolTip with detailed information for session button.
     - Show session path in session button in Favorite and Running views.
+    - Improve synchronisation in broker mode.
 
   [ Ryan Schmidt ]
   * New upstream version (4.1.2.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 349bc20..cee1e15 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -3261,6 +3261,10 @@ void ONMainWindow::slotSshServerAuthError ( int error, 
QString sshMessage, SshMa
         activateWindow();
         raise();
     }
+    if(brokerMode && config.brokerSyncTimeout && 
!(brokerSyncTimer->isActive()))
+    {
+            brokerSyncTimer->start();
+    }
     QString errMsg;
     switch ( error )
     {
@@ -3395,10 +3399,11 @@ void ONMainWindow::slotSshUserAuthError ( QString error 
)
     slotShowPassForm();
     pass->setFocus();
     pass->selectAll();
-
-
-
     passForm->setEnabled ( true );
+    if(brokerMode && config.brokerSyncTimeout && 
!(brokerSyncTimer->isActive()))
+    {
+            brokerSyncTimer->start();
+    }
 }
 
 void ONMainWindow::slotSessEnter()
@@ -3803,6 +3808,21 @@ bool ONMainWindow::startSession ( const QString& sid, 
CONTYPE conType )
             host=suspendTerminateHostFromBroker;
         sshPort=config.sshport;
         x2goDebug<<"Server: "<<host;
+        if(host.indexOf("No servers available")!=-1)
+        {
+            x2goDebug<<"There are no available X2Go servers for this 
connection";
+            QMessageBox::critical (0l,tr("Error"),
+                               tr ("There are no available X2Go Servers for 
this connection. Please try again later or choose another session."), 
QMessageBox::Ok,
+                               QMessageBox::NoButton);
+
+            setEnabled(true);
+            passForm->setEnabled(true);
+            if(config.brokerSyncTimeout && !(brokerSyncTimer->isActive()))
+            {
+                brokerSyncTimer->start();
+            }
+            return false;
+        }
     }
     else if (embedMode)
     {
@@ -5450,6 +5470,13 @@ void ONMainWindow::slotRetSuspSess ( bool result, 
QString output,
     {
         slotResumeSess();
     }
+    else
+    {
+        if(brokerMode && config.brokerSyncTimeout && 
!(brokerSyncTimer->isActive()))
+        {
+            brokerSyncTimer->start();
+        }
+    }
 }
 
 
@@ -5546,6 +5573,11 @@ void ONMainWindow::slotRetTermSess ( bool result,  
QString output,
     }
     if ( selectSessionDlg->isVisible() )
         selectSessionDlg->setEnabled ( true );
+    if(brokerMode && config.brokerSyncTimeout && 
!(brokerSyncTimer->isActive()))
+    {
+            brokerSyncTimer->start();
+    }
+
 }
 
 void ONMainWindow::slotRetResumeSess ( bool result,

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to