mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
parent
2a1482c880
commit
362106df62
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,8 @@ impl ChannelManager {
|
||||||
impl Channel {
|
impl Channel {
|
||||||
fn recv_packet(&mut self) -> Poll<Bytes, ChannelError> {
|
fn recv_packet(&mut self) -> Poll<Bytes, ChannelError> {
|
||||||
let (cmd, packet) = match self.receiver.poll() {
|
let (cmd, packet) = match self.receiver.poll() {
|
||||||
Ok(Async::Ready(t)) => t.expect("channel closed"),
|
Ok(Async::Ready(Some(t))) => t,
|
||||||
|
Ok(Async::Ready(None)) => return Err(ChannelError), // The channel has been closed.
|
||||||
Ok(Async::NotReady) => return Ok(Async::NotReady),
|
Ok(Async::NotReady) => return Ok(Async::NotReady),
|
||||||
Err(()) => unreachable!(),
|
Err(()) => unreachable!(),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue