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:
parent
78ce118d32
commit
9d0e39f9c3
2 changed files with 6 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue