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




commit 89765c0d129e85fcb0e135f64fdf9da62f31e0e0
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]