diff --git a/src/spotify_worker.rs b/src/spotify_worker.rs index 7340a74..7b84f39 100644 --- a/src/spotify_worker.rs +++ b/src/spotify_worker.rs @@ -64,6 +64,13 @@ impl Worker { } } +impl Drop for Worker { + fn drop(&mut self) { + debug!("Worker thread is shutting down, stopping player"); + self.player.stop(); + } +} + impl Worker { fn get_token( &self,