Skip to content

Commit c014f94

Browse files
committed
Close handler when loading fails + volatile gg
1 parent 9c9842a commit c014f94

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

core/src/main/java/xyz/gianlu/librespot/player/PlayerRunner.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ public void run() {
418418
handler.load((int) cmd.args[1]);
419419
} catch (IOException | LineHelper.MixerException | Codec.CodecException | ContentRestrictedException | MercuryClient.MercuryException | CdnManager.CdnException ex) {
420420
listener.loadingError(handler, handler.playable, ex);
421+
handler.close();
421422
}
422423
break;
423424
case PushToMixer:

core/src/main/java/xyz/gianlu/librespot/player/mixing/MixingLine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class MixingLine extends InputStream {
2323
private volatile boolean se = false;
2424
private volatile float fg = 1;
2525
private volatile float sg = 1;
26-
private float gg = 1;
26+
private volatile float gg = 1;
2727

2828
public MixingLine(@NotNull AudioFormat format) {
2929
this.format = format;

0 commit comments

Comments
 (0)