[connections/fix-rdp-auth-issues: 3/4] rdp-connection: Disconnect connection in auth-failure




commit c713bfc751cd2727b513b5f1f67f48494bd258a7
Author: Felipe Borges <felipeborges gnome org>
Date:   Fri Aug 6 10:23:17 2021 +0200

    rdp-connection: Disconnect connection in auth-failure

 src/rdp-connection.vala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/rdp-connection.vala b/src/rdp-connection.vala
index 64995f0..d1bc319 100644
--- a/src/rdp-connection.vala
+++ b/src/rdp-connection.vala
@@ -61,6 +61,7 @@ namespace Connections {
 
             display.rdp_connected.connect (() => { show (); });
             display.rdp_needs_authentication.connect (on_rdp_auth_credential_cb);
+            display.rdp_auth_failure.connect (auth_failed);
             //display.size_allocate.connect (scale);
         }
 
@@ -88,7 +89,8 @@ namespace Connections {
         }
 
         public override void disconnect_it () {
-            display.close ();
+            if (connected)
+                display.close ();
             connected = false;
         }
 
@@ -103,7 +105,7 @@ namespace Connections {
 
             handle_auth ();
 
-            display.close ();
+            disconnect_it ();
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]