[gnome-remote-desktop] session-rdp: Send Provider Ultimatum after the socket thread stopped



commit adfdb804184e756d95f46fca9e5d0ce2980e71e6
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Fri Mar 19 19:31:24 2021 +0100

    session-rdp: Send Provider Ultimatum after the socket thread stopped
    
    The Disconnect Provider Ultimatum PDU is supposed to be the last PDU
    that is sent to the client.
    This can only be assured, if the socket thread ends before sending this
    PDU.
    
    So, move the Close() call below the join call of the socket thread.

 src/grd-session-rdp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c
index 5c127a1..6cc4e15 100644
--- a/src/grd-session-rdp.c
+++ b/src/grd-session-rdp.c
@@ -1748,8 +1748,9 @@ grd_session_rdp_stop (GrdSession *session)
 
   g_clear_object (&rdp_peer_context->clipboard_rdp);
 
-  peer->Close (peer);
   g_clear_pointer (&session_rdp->socket_thread, g_thread_join);
+
+  peer->Close (peer);
   g_clear_object (&session_rdp->connection);
 
   if (rdp_peer_context->sam_file)


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