Skip to content

Commit 1b88db9

Browse files
committed
When authenticating with token, perform reconnect to create session with ReusableAuthCredentials
1 parent d44cbcc commit 1b88db9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/src/main/java/xyz/gianlu/librespot/core/Session.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ private void connect() throws IOException, GeneralSecurityException, SpotifyAuth
341341
private void authenticate(@NotNull Authentication.LoginCredentials credentials) throws IOException, GeneralSecurityException, SpotifyAuthenticationException, MercuryClient.MercuryException {
342342
authenticatePartial(credentials, false);
343343

344+
if (credentials.getTyp() == Authentication.AuthenticationType.AUTHENTICATION_SPOTIFY_TOKEN)
345+
reconnect();
346+
344347
synchronized (authLock) {
345348
mercuryClient = new MercuryClient(this);
346349
tokenProvider = new TokenProvider(this);

0 commit comments

Comments
 (0)