Skip to content

Commit 7a17d64

Browse files
committed
Fixed #49
1 parent 803d1ad commit 7a17d64

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,6 @@ void connect() throws IOException, GeneralSecurityException, SpotifyAuthenticati
200200
void authenticate(@NotNull Authentication.LoginCredentials credentials) throws IOException, GeneralSecurityException, SpotifyAuthenticationException, MercuryClient.PubSubException, SpotifyIrc.IrcException {
201201
authenticatePartial(credentials);
202202

203-
synchronized (authLock) {
204-
authLock.set(false);
205-
authLock.notifyAll();
206-
}
207-
208203
mercuryClient = new MercuryClient(this);
209204

210205
audioKeyManager = new AudioKeyManager(this);
@@ -242,6 +237,11 @@ private void authenticatePartial(@NotNull Authentication.LoginCredentials creden
242237
byte[] bytes0x0f = new byte[20];
243238
random().nextBytes(bytes0x0f);
244239
sendUnchecked(Packet.Type.Unknown_0x0f, bytes0x0f);
240+
241+
synchronized (authLock) {
242+
authLock.set(false);
243+
authLock.notifyAll();
244+
}
245245
} else if (packet.is(Packet.Type.AuthFailure)) {
246246
throw new SpotifyAuthenticationException(Keyexchange.APLoginFailed.parseFrom(packet.payload));
247247
} else {

0 commit comments

Comments
 (0)