X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2FFcpConnection.java;h=d4271a57c2571d6a326c14fd930bbbe91d523987;hb=4d849ec50a85129aa5259be84f4ffb3dbdd579e4;hp=a80c6100269f4267a4e5cdf1d2592cbd0b9f5c4e;hpb=5d8be52616c65515b440313aa5b8e954eb426fd2;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/FcpConnection.java b/src/net/pterodactylus/fcp/FcpConnection.java index a80c610..d4271a5 100644 --- a/src/net/pterodactylus/fcp/FcpConnection.java +++ b/src/net/pterodactylus/fcp/FcpConnection.java @@ -309,6 +309,8 @@ public class FcpConnection implements Closeable { fcpListenerManager.fireReceivedNodeHello(new NodeHello(fcpMessage)); } else if ("CloseConnectionDuplicateClientName".equals(messageName)) { fcpListenerManager.fireReceivedCloseConnectionDuplicateClientName(new CloseConnectionDuplicateClientName(fcpMessage)); + } else if ("ReceivedBookmarkFeed".equals(messageName)) { + fcpListenerManager.fireReceivedBookmarkFeed(new ReceivedBookmarkFeed(fcpMessage)); } else { fcpListenerManager.fireMessageReceived(fcpMessage); } @@ -337,8 +339,8 @@ public class FcpConnection implements Closeable { // /** - * Incremets the counter in {@link #incomingMessageStatistics} by 1 - * for the given message name. + * Incremets the counter in {@link #incomingMessageStatistics} by + * 1 for the given message name. * * @param name * The name of the message to count @@ -359,7 +361,7 @@ public class FcpConnection implements Closeable { * The length of the stream * @return The limited input stream */ - private LimitedInputStream getInputStream(long dataLength) { + private synchronized LimitedInputStream getInputStream(long dataLength) { if (dataLength <= 0) { return new LimitedInputStream(null, 0); } @@ -482,7 +484,7 @@ public class FcpConnection implements Closeable { * @throws IOException * if an I/O error occurs */ - public void consume() throws IOException { + public synchronized void consume() throws IOException { while (remaining > 0) { skip(remaining); }