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

x2go pushed a commit to branch master
in repository libx2goclient.

commit 9ba06519e055dc9552182985e68bbbcc21e9370a
Author: Mihai Moldovan <io...@ionic.de>
Date:   Thu Sep 17 10:58:28 2020 +0200

    src/test/sshtest.c: only try to connect again if the first connection 
succeeded.
---
 src/test/sshtest.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/test/sshtest.c b/src/test/sshtest.c
index f8fc78a..1a3294f 100644
--- a/src/test/sshtest.c
+++ b/src/test/sshtest.c
@@ -108,13 +108,15 @@ int main (const int argc, const char * const * const 
argv) {
   g_object_get (G_OBJECT (net_ssh), "connected", &conn_ret, NULL);
   g_printf ("Current connection status (via getter): %d\n", (int) (conn_ret));
 
-  /* Connect again, shouldn't cause anything to change. */
-  g_printf ("Trying to connect again...\n");
-  conn_ret = x2goclient_network_ssh_connect (net_ssh, NULL);
-  g_printf ("Connection status: %s.\n", (conn_ret) ? "true" : "false");
-
-  /* Let ssh connection live for a few seconds, give or take. */
-  sleep (30);
+  if (conn_ret) {
+    /* Connect again, shouldn't cause anything to change. */
+    g_printf ("Trying to connect again...\n");
+    conn_ret = x2goclient_network_ssh_connect (net_ssh, NULL);
+    g_printf ("Connection status: %s.\n", (conn_ret) ? "true" : "false");
+
+    /* Let ssh connection live for a few seconds, give or take. */
+    sleep (30);
+  }
 
   g_clear_object (&net_ssh);
 

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

Reply via email to