Flush the correct stream
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / JsonPage.java
index 943135d..21f44d2 100644 (file)
@@ -228,7 +228,7 @@ public abstract class JsonPage implements FreenetPage {
                        writer = new OutputStreamWriter(byteArrayOutputStream, "UTF-8");
                        printWriter = new PrintWriter(writer);
                        t.printStackTrace(printWriter);
-                       byteArrayOutputStream.flush();
+                       printWriter.flush();
                        return byteArrayOutputStream.toByteArray();
                } catch (IOException ioe1) {
                        /* quite not possible. */