xpra icon
Bug tracker and wiki

Opened 3 years ago

Closed 2 years ago

#623 closed task (fixed)

consistent and reliable client exit code and information

Reported by: Antoine Martin Owned by: Scott Bennett
Priority: critical Milestone: 0.14
Component: core Version: trunk
Keywords: Cc:

Description

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.

Change History (6)

comment:1 Changed 3 years ago by Antoine Martin

Owner: changed from Antoine Martin to Scott Bennett

See r7075.

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 (EXIT_OK)
  • 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 (EXIT_CONNECTION_LOST)
  • 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 (EXIT_TIMEOUT)

Some of the other disconnection messages can be a bit harder to trigger, see #614 for example.

Will that do?

comment:2 Changed 3 years ago by 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

Last edited 3 years ago by Antoine Martin (previous) (diff)

comment:3 Changed 3 years ago by Antoine Martin

Priority: majorcritical

Should be closed for v0.14.x, raising to critical.

comment:4 Changed 3 years ago by Antoine Martin

Milestone: 0.150.14

Should be closed against milestone 0.14

comment:5 Changed 3 years ago by Antoine Martin

Bump!

comment:6 Changed 2 years ago by Scott Bennett

Resolution: fixed
Status: newclosed

Verified and tested in 0.14.12, thank you

Note: See TracTickets for help on using tickets.