Close all streams when finishing.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / filter / ExternalFilter.java
index c3ab508..5b4fc2c 100644 (file)
@@ -116,6 +116,13 @@ public abstract class ExternalFilter implements Filter {
                                protected void feed(byte[] buffer) throws IOException {
                                        processInput.write(buffer);
                                }
+
+                               @Override
+                               protected void finish() throws IOException {
+                                       processInput.close();
+                                       processOutput.close();
+                                       processError.close();
+                               }
                        }).start();
                } catch (IOException ioe1) {