]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
prserv/serv: Improve exit handling
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Jan 2015 13:53:59 +0000 (13:53 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Jan 2015 14:56:19 +0000 (14:56 +0000)
commit0926492295d485813d8a4f6b77c7b152e4c5b4c4
treec0b3bddac64baa5a9c3c3260cfc36e8e9bc5486a
parent909fa19f20e909820aa484967b7fe2a34d89ab49
prserv/serv: Improve exit handling

Currently, I'm not sure how the prserver managed to shut down cleanly. These
issues may explain some of the hangs people have reported.

This change:

* Ensures the connection acceptance thread monitors self.quit
* We wait for the thread to exit before exitting
* We sync the database when the thread exits
* We do what the comment mentions, timeout after 30s and sync the database
  if needed. Previously, there was no timeout (the 0.5 applies to sockets,
  not the Queue object)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/prserv/serv.py