X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2FFcpConnectionHandler.java;h=2c37e5eace1e1c21f52493d07ae8b3025b9d763c;hb=07b8dedfe353a27cb06c7f7d3086680829917c48;hp=ba6b86b6d31bc6629cbc173f27b9dc12f9b368bb;hpb=f41043557fe9cf82ae5c52d51a1d4f07f27e505d;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/FcpConnectionHandler.java b/src/net/pterodactylus/fcp/FcpConnectionHandler.java index ba6b86b..2c37e5e 100644 --- a/src/net/pterodactylus/fcp/FcpConnectionHandler.java +++ b/src/net/pterodactylus/fcp/FcpConnectionHandler.java @@ -26,9 +26,8 @@ import java.nio.charset.Charset; /** * Handles an FCP connection to a node. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> - * @version $Id$ */ class FcpConnectionHandler implements Runnable { @@ -47,7 +46,7 @@ class FcpConnectionHandler implements Runnable { /** * Creates a new connection handler that operates on the given connection * and input stream. - * + * * @param fcpConnection * The underlying FCP connection * @param remoteInputStream @@ -84,7 +83,7 @@ class FcpConnectionHandler implements Runnable { fcpMessage = new FcpMessage(line); continue; } - if ("EndMessage".equals(line)) { + if ("EndMessage".equalsIgnoreCase(line) || "Data".equalsIgnoreCase(line)) { fcpConnection.handleMessage(fcpMessage); fcpMessage = null; } @@ -121,7 +120,7 @@ class FcpConnectionHandler implements Runnable { /** * Reads bytes from {@link #remoteInputStream} until ‘\r’ or ‘\n’ are * encountered and decodes the read bytes using UTF-8. - * + * * @return The decoded line * @throws IOException * if an I/O error occurs