diff --git a/audio/src/fetch.rs b/audio/src/fetch.rs index df5eeef7..f9bd11a9 100644 --- a/audio/src/fetch.rs +++ b/audio/src/fetch.rs @@ -340,7 +340,7 @@ impl Seek for AudioFileStreaming { // Notify the fetch thread to get the correct block // This can fail if fetch thread has completed, in which case the // block is ready. Just ignore the error. - let _ = self.seek.send(self.position); + let _ = self.seek.unbounded_send(self.position); Ok(self.position) } } diff --git a/core/src/channel.rs b/core/src/channel.rs index 30a9e00e..8370da44 100644 --- a/core/src/channel.rs +++ b/core/src/channel.rs @@ -61,7 +61,7 @@ impl ChannelManager { self.lock(|inner| { if let Entry::Occupied(entry) = inner.channels.entry(id) { - let _ = entry.get().send((cmd, data)); + let _ = entry.get().unbounded_send((cmd, data)); } }); } diff --git a/core/src/mercury/mod.rs b/core/src/mercury/mod.rs index 45e12f18..37514876 100644 --- a/core/src/mercury/mod.rs +++ b/core/src/mercury/mod.rs @@ -211,7 +211,7 @@ impl MercuryManager { // if send fails, remove from list of subs // TODO: send unsub message - sub.send(response.clone()).is_ok() + sub.unbounded_send(response.clone()).is_ok() } else { // URI doesn't match true diff --git a/core/src/session.rs b/core/src/session.rs index 067b685b..1534d3ed 100644 --- a/core/src/session.rs +++ b/core/src/session.rs @@ -177,7 +177,7 @@ impl Session { } pub fn send_packet(&self, cmd: u8, data: Vec) { - self.0.tx_connection.send((cmd, data)).unwrap(); + self.0.tx_connection.unbounded_send((cmd, data)).unwrap(); } pub fn cache(&self) -> Option<&Arc> { diff --git a/src/discovery.rs b/src/discovery.rs index 46f44dd0..0b6e4ad1 100644 --- a/src/discovery.rs +++ b/src/discovery.rs @@ -136,7 +136,7 @@ impl Discovery { let credentials = Credentials::with_blob(username.to_owned(), &decrypted, &self.0.device_id); - self.0.tx.send(credentials).unwrap(); + self.0.tx.unbounded_send(credentials).unwrap(); let result = json!({ "status": 101, diff --git a/src/spirc.rs b/src/spirc.rs index f2265a6e..a36d0b1d 100644 --- a/src/spirc.rs +++ b/src/spirc.rs @@ -177,28 +177,28 @@ impl Spirc { } pub fn play(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::Play); + let _ = self.commands.unbounded_send(SpircCommand::Play); } pub fn play_pause(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::PlayPause); + let _ = self.commands.unbounded_send(SpircCommand::PlayPause); } pub fn pause(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::Pause); + let _ = self.commands.unbounded_send(SpircCommand::Pause); } pub fn prev(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::Prev); + let _ = self.commands.unbounded_send(SpircCommand::Prev); } pub fn next(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::Next); + let _ = self.commands.unbounded_send(SpircCommand::Next); } pub fn volume_up(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::VolumeUp); + let _ = self.commands.unbounded_send(SpircCommand::VolumeUp); } pub fn volume_down(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::VolumeDown); + let _ = self.commands.unbounded_send(SpircCommand::VolumeDown); } pub fn shutdown(&self) { - let _ = mpsc::UnboundedSender::send(&self.commands, SpircCommand::Shutdown); + let _ = self.commands.unbounded_send(SpircCommand::Shutdown); } }