Skip to content

Commit 6ecb970

Browse files
committed
Synchronize TokenProvider
1 parent a03b16c commit 6ecb970

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private StoredToken findTokenWithAllScopes(String[] scopes) {
3737
}
3838

3939
@NotNull
40-
public StoredToken getToken(@NotNull String... scopes) throws IOException, MercuryClient.MercuryException {
40+
public synchronized StoredToken getToken(@NotNull String... scopes) throws IOException, MercuryClient.MercuryException {
4141
if (scopes.length == 0) throw new IllegalArgumentException();
4242

4343
StoredToken token = findTokenWithAllScopes(scopes);

0 commit comments

Comments
 (0)