xpra icon
Bug tracker and wiki

Opened 4 years ago

Closed 4 years ago

#1122 closed defect (fixed)

websockify connection prevents server from exiting

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.17
Component: server Version: trunk
Keywords: Cc:

Description

As reported here: http://lists.devloop.org.uk/pipermail/shifter-users/2016-February/001482.html.
What happens is that we use blocking sockets (see r9164 and r4948), and the proxy threads that forward to and from websockify are blocked waiting for data - which never comes. We would kill the websockify server, but that comes later during the cleanup sequence..

The proper solution, which was already planned, is to move more code to the server base class so it can take responsibility for cleaning things up in the right order.

Change History (1)

comment:1 Changed 4 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Trivial fix in r11964. (r11966 for older branches)

To avoid using non-blocking sockets, I tried making the network threads daemon threads so that we could exit the server main loop and kill the websockify process, but for some reason that didn't work and the server was still deadlocked on reading from the server socket. Weird.
I also tried killing websockify before closing the sockets.

See also #1123.

Note: See TracTickets for help on using tickets.