1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-03 01:39:28 +02:00

add session timeout handling (#1129)

This commit is contained in:
eladyn 2023-06-01 21:39:35 +02:00 committed by GitHub
parent 310725d2fb
commit 4d402e690c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 22 deletions

View file

@ -1,7 +1,6 @@
use std::{
collections::HashMap,
future::Future,
mem,
pin::Pin,
task::{Context, Poll},
};
@ -200,7 +199,7 @@ impl MercuryManager {
for i in 0..count {
let mut part = Self::parse_part(&mut data);
if let Some(mut partial) = mem::replace(&mut pending.partial, None) {
if let Some(mut partial) = pending.partial.take() {
partial.extend_from_slice(&part);
part = partial;
}