X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2FFcpConnectionHandler.java;h=dbf09696fad32f5d60c6931ae7e2e81c0273cfb7;hb=dd605aee444057a874fabf7fb0045b8448b0d1cd;hp=a8132c31f8a3b03a547d7a45d642e026958b17f1;hpb=930a13cd3640422a0fd23e2952cacf798286f0bc;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/FcpConnectionHandler.java b/src/net/pterodactylus/fcp/FcpConnectionHandler.java index a8132c3..dbf0969 100644 --- a/src/net/pterodactylus/fcp/FcpConnectionHandler.java +++ b/src/net/pterodactylus/fcp/FcpConnectionHandler.java @@ -1,6 +1,5 @@ /* - * jSite2 - FcpConnectionHandler.java - - * Copyright © 2008 David Roden + * jFCPlib - FcpConnectionHandler.java - Copyright © 2008 David Roden * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +27,6 @@ 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 { @@ -84,7 +82,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; } @@ -97,8 +95,8 @@ class FcpConnectionHandler implements Runnable { String value = line.substring(equalSign + 1); assert fcpMessage != null: "fcp message is null"; fcpMessage.setField(field, value); - } catch (IOException e) { - throwable = null; + } catch (IOException ioe1) { + throwable = ioe1; break; } }