public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH spiceterm] screen.c: fix exiting on client disconnect
@ 2021-06-23  7:45 Dominik Csapak
  2021-06-23  7:59 ` Dominik Csapak
  2021-06-23  8:13 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2021-06-23  7:45 UTC (permalink / raw)
  To: pve-devel

the way we detected a client_disconnect does not work anymore with
spice-server >= 0.14.3, but there is a convienient function
that exits the spice-server on client disconnect

there is a slight behaviour change that should not make a big difference:

previously, if a user used the same '.vv' file twice, the first client
got disconnected and the second would connect

now, because the server closes on disconnect, the second client is
not be able to connect anymore

using our ui though, every click on 'shell>spice' generates a new '.vv'
file that works though (and for container shells we use dtach to mux)

i could not (in reasonable time) find out why the first client
disconnects at all, and also could not find another way to detect a
client disconnect that is similar to our previous method

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/screen.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/screen.c b/src/screen.c
index 871d16f..ee6e34a 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -789,6 +789,8 @@ spice_screen_new(
         }
     }
 
+    spice_server_set_exit_on_disconnect(server, 1);
+
     int res = spice_server_init(server, core);
     if (res != 0) {
         g_error("spice_server_init failed, res = %d\n", res);
-- 
2.20.1





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-23  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23  7:45 [pve-devel] [PATCH spiceterm] screen.c: fix exiting on client disconnect Dominik Csapak
2021-06-23  7:59 ` Dominik Csapak
2021-06-23  8:13 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal