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

windows stay visible on the screen even if the server is killed #4

Closed
totaam opened this issue Jul 5, 2011 · 6 comments
Closed

windows stay visible on the screen even if the server is killed #4

totaam opened this issue Jul 5, 2011 · 6 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 5, 2011

Issue migrated from trac ticket # 4

component: client | priority: major | resolution: duplicate

2011-07-05 08:57:19: lindi created the issue


Currently if the server is killed the _to_server thread exits and
closes both _client_conn and _server_conn. However, this does not
cause the _to_client thread to stop. As a result an extra "xpra"
process stays listed in the process list and users don't notice that
the server has died. Only if you try to interactive with any of the
windows will the proxy write something to the server socket and notice
the problem.

This patch stops _to_client thread when _to_server thread exits and
vice versa. Calling _Thread_stop() is bit ugly but the alternative
would probably be to use some sort of polling mechanism instead of
blocking read() in _copy_loop.

@totaam
Copy link
Collaborator Author

totaam commented Jul 5, 2011

2011-07-05 08:59:13: lindi commented


Sorry, I accidentally created two bugs when I only wanted one. Please close this and look at bug #5 instead.

@totaam
Copy link
Collaborator Author

totaam commented Jul 5, 2011

2011-07-05 09:12:37: lindi commented


If you click a window when the server has died you get

 Exception in thread Thread-2:
 Traceback (most recent call last):
   File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.6/threading.py", line 484, in run
      self.__target(*self.__args, **self.__kwargs)
   File "/usr/lib/python2.6/dist-packages/xpra/proxy.py", line 28, in _to_server_loop
     self._copy_loop("->server", self._client_conn, self._server_conn)
    File "/usr/lib/python2.6/dist-packages/xpra/proxy.py", line 40, in _copy_loop
     buf = buf[to_conn.write(buf):]
   File "/usr/lib/python2.6/dist-packages/xpra/protocol.py", line 50, in write
     return self._s.send(buf)
   File "/usr/lib/python2.6/socket.py", line 167, in _dummy
      raise error(EBADF, 'Bad file descriptor')
 error: [Errno 9] Bad file descriptor
 
 Connection lost
 Error reading from connection: I/O operation on closed file

After this patch you get

Connection lost

immediately when the server dies

@totaam
Copy link
Collaborator Author

totaam commented Jul 5, 2011

2011-07-05 20:09:52: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jul 5, 2011

2011-07-05 20:09:52: antoine changed resolution from ** to duplicate

@totaam
Copy link
Collaborator Author

totaam commented Jul 5, 2011

2011-07-05 20:09:52: antoine commented


Dupe of #5 (more details and patch there)

@totaam totaam closed this as completed Jul 5, 2011
@totaam
Copy link
Collaborator Author

totaam commented Feb 20, 2012

2012-02-20 19:53:21: totaam

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