Xpra: Ticket #623: consistent and reliable client exit code and information
There can be many reasons why we close a connection.
Unless this is simply a network failure which is an error and should be reported as such (and the client process should terminate with a non-zero exit code), we should generally be able to tell the user why the disconnection occurred.
Most of the code is already there, it just needs to be constified so these values can be relied on.
Fri, 01 Aug 2014 09:20:34 GMT - Antoine Martin: owner changed
changed from Antoine Martin to Scott Bennett
Please test, ie:
- attaching from another client with sharing turned off, the previous client gets disconnected with this message server requested disconnect: new client (this session does not allow sharing) and the exit code is 0 (
- stopping a server (either control-C or via
xpra stop) whilst the client is connected gives: server requested disconnect: server shutdown (and still 0)
- killing the vfb from underneath the server (naughty!) kills it and the client just sees a Connection lost and sets the exit code 1 (
- similarly, severing the connection between the client and server eventually causes a server ping timeout - waited 60 seconds without a response, followed by the same Connection lost and sets the exit code to 2 (
Some of the other disconnection messages can be a bit harder to trigger, see #614 for example.
Will that do?
Fri, 01 Aug 2014 16:32:07 GMT - Antoine Martin:
As of r7088, the server-side messages are nicer and the client tries to tell the server when it is exiting and why, ie:
- when receiving a control-C:
client Protocol(SocketConnection(/home/antoine/.xpra/desktop-10)) has requested disconnection: exit on signal SIGINT
- when exiting from the system tray:
client Protocol(SocketConnection(/home/antoine/.xpra/desktop-10)) has requested disconnection: client exit
Sun, 17 Aug 2014 14:22:33 GMT - Antoine Martin: priority changed
changed from major to critical
Should be closed for v0.14.x, raising to critical.
Tue, 19 Aug 2014 03:34:17 GMT - Antoine Martin: milestone changed
changed from 0.15 to 0.14
Should be closed against milestone 0.14
Mon, 27 Oct 2014 17:52:27 GMT - Antoine Martin:
Tue, 25 Nov 2014 19:34:26 GMT - Scott Bennett: status changed; resolution set
changed from new to closed
set to fixed
Verified and tested in 0.14.12, thank you
Sat, 23 Jan 2021 05:01:11 GMT - migration script:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/623