Skip to content

Commit c0d8fbb

Browse files
committed
Trying to fix deadlock when shutting down
1 parent 5766289 commit c0d8fbb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/main/java/xyz/gianlu/librespot/mercury/MercuryClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ public void close() {
247247
}
248248

249249
while (true) {
250-
if (callbacks.isEmpty()) {
251-
break;
252-
} else {
253-
synchronized (callbacks) {
250+
synchronized (callbacks) {
251+
if (callbacks.isEmpty()) {
252+
break;
253+
} else {
254254
try {
255255
callbacks.wait(100);
256256
} catch (InterruptedException ignored) {

0 commit comments

Comments
 (0)