libspotify thread should not stop Mopidy from exiting, and is thus a daemon thread

This commit is contained in:
Stein Magnus Jodal 2010-08-20 12:34:41 +02:00
parent aba0cc3ef3
commit 461830924a

View File

@ -19,6 +19,9 @@ class LibspotifySessionManager(SpotifySessionManager, threading.Thread):
def __init__(self, username, password, core_queue, output_queue):
SpotifySessionManager.__init__(self, username, password)
threading.Thread.__init__(self)
# Run as a daemon thread, so Mopidy won't wait for this thread to exit
# before Mopidy exits.
self.daemon = True
self.core_queue = core_queue
self.output_queue = output_queue
self.connected = threading.Event()