From 24c7c279c67bd5fe34bfef81e1ab936d7b555b3a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 10 Jul 2015 14:38:40 +0200 Subject: [PATCH] Throw an exception on EOF! --- src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java b/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java index ad3e3f3..256efef 100644 --- a/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java +++ b/src/main/java/net/pterodactylus/fcp/FcpConnectionHandler.java @@ -18,6 +18,7 @@ package net.pterodactylus.fcp; +import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; @@ -78,6 +79,7 @@ class FcpConnectionHandler implements Runnable { String line = readLine(); logger.log(Level.FINEST, String.format("read line: %1$s", line)); if (line == null) { + throwable = new EOFException(); break; } if (line.length() == 0) { -- 2.7.4