krfb-crash-2.patch 909 B

1234567891011121314151617181920212223242526
  1. From 15c4f144a3783d9f1f2c976acf9f4d85988fd466 Mon Sep 17 00:00:00 2001
  2. From: Albert Astals Cid <aacid@kde.org>
  3. Date: Sun, 5 Jan 2020 19:56:57 +0100
  4. Subject: [PATCH] rfbShutdownServer: Call rfbClientConnectionGone if no
  5. backgroundLoop
  6. Otherwise the servers that don't use rfbRunEventLoop don't get
  7. notified of client disconnections
  8. ---
  9. libvncserver/main.c | 2 ++
  10. 1 file changed, 2 insertions(+)
  11. diff --git a/libvncserver/main.c b/libvncserver/main.c
  12. index b51f0ab6..738a501d 100644
  13. --- a/libvncserver/main.c
  14. +++ b/libvncserver/main.c
  15. @@ -1152,6 +1152,8 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
  16. write(currentCl->pipe_notify_client_thread[1], "\x00", 1);
  17. /* And wait for it to finish. */
  18. pthread_join(currentCl->client_thread, NULL);
  19. + } else {
  20. + rfbClientConnectionGone(currentCl);
  21. }
  22. #else
  23. rfbClientConnectionGone(currentCl);