Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consistent and reliable client exit code and information #623

Closed
totaam opened this issue Aug 1, 2014 · 10 comments
Closed

consistent and reliable client exit code and information #623

totaam opened this issue Aug 1, 2014 · 10 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Aug 1, 2014

Issue migrated from trac ticket # 623

component: core | priority: critical | resolution: fixed

2014-08-01 09:21:17: totaam created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Aug 1, 2014

2014-08-01 10:20:35: totaam changed owner from antoine to sbennett

@totaam
Copy link
Collaborator Author

totaam commented Aug 1, 2014

2014-08-01 10:20:35: totaam commented


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?

@totaam
Copy link
Collaborator Author

totaam commented Aug 1, 2014

2014-08-01 17:32:08: totaam commented


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

@totaam
Copy link
Collaborator Author

totaam commented Aug 17, 2014

2014-08-17 15:22:34: totaam changed priority from major to critical

@totaam
Copy link
Collaborator Author

totaam commented Aug 17, 2014

2014-08-17 15:22:34: totaam commented


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

@totaam
Copy link
Collaborator Author

totaam commented Aug 19, 2014

2014-08-19 04:34:18: totaam commented


Should be closed against milestone 0.14

@totaam
Copy link
Collaborator Author

totaam commented Oct 27, 2014

2014-10-27 17:52:27: totaam commented


Bump!

@totaam
Copy link
Collaborator Author

totaam commented Nov 25, 2014

2014-11-25 19:34:27: sbennett changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Nov 25, 2014

2014-11-25 19:34:27: sbennett changed resolution from ** to fixed

@totaam
Copy link
Collaborator Author

totaam commented Nov 25, 2014

2014-11-25 19:34:27: sbennett commented


Verified and tested in 0.14.12, thank you

@totaam totaam closed this as completed Nov 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant