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

fix: fires the connect and disconnect again (#1548)

This commit is contained in:
Felix Prillwitz 2025-08-24 12:27:53 +02:00 committed by GitHub
parent 78ce118d32
commit 9d0e39f9c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View file

@ -29,7 +29,7 @@ use futures_util::future::IntoStream;
use http::{Uri, header::HeaderValue};
use hyper::{
HeaderMap, Method, Request,
header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE, HeaderName, RANGE},
header::{ACCEPT, AUTHORIZATION, CONTENT_LENGTH, CONTENT_TYPE, HeaderName, RANGE},
};
use hyper_util::client::legacy::ResponseFuture;
use protobuf::{Enum, Message, MessageFull};
@ -482,6 +482,7 @@ impl SpClient {
let mut request = Request::builder()
.method(method)
.uri(url)
.header(CONTENT_LENGTH, body.len())
.body(Bytes::copy_from_slice(body))?;
// Reconnection logic: keep getting (cached) tokens because they might have expired.