diff --git a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosAudioSink.java b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosAudioSink.java index 7eb7d32b31eca..31fd469d76a0e 100644 --- a/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosAudioSink.java +++ b/bundles/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/internal/SonosAudioSink.java @@ -19,7 +19,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import org.apache.commons.io.IOUtils; import org.eclipse.smarthome.core.audio.AudioFormat; import org.eclipse.smarthome.core.audio.AudioHTTPServer; import org.eclipse.smarthome.core.audio.AudioSink; @@ -115,7 +114,11 @@ public void process(AudioStream audioStream) logger.warn("We do not have any callback url, so Sonos cannot play the audio stream!"); } } else { - IOUtils.closeQuietly(audioStream); + try { + audioStream.close(); + } catch (IOException e) { + logger.debug("Error while closing the audio stream: {}", e.getMessage()); + } throw new UnsupportedAudioStreamException( "Sonos can only handle FixedLengthAudioStreams and URLAudioStreams.", audioStream.getClass()); // Instead of throwing an exception, we could ourselves try to wrap it into a