From: David ‘Bombe’ Roden Date: Tue, 24 Mar 2009 14:51:39 +0000 (+0100) Subject: Change method of getting persistent get requests that does not change the “WatchGloba... X-Git-Tag: v0.1.1~72 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=64dac1e9c65e7e809db0bffd9aac1afea86568a6;p=jFCPlib.git Change method of getting persistent get requests that does not change the “WatchGlobal” setting. --- diff --git a/src/net/pterodactylus/fcp/highlevel/FcpClient.java b/src/net/pterodactylus/fcp/highlevel/FcpClient.java index dae7546..30424ac 100644 --- a/src/net/pterodactylus/fcp/highlevel/FcpClient.java +++ b/src/net/pterodactylus/fcp/highlevel/FcpClient.java @@ -52,7 +52,6 @@ import net.pterodactylus.fcp.PersistentGet; import net.pterodactylus.fcp.ProtocolError; import net.pterodactylus.fcp.RemovePeer; import net.pterodactylus.fcp.SSKKeypair; -import net.pterodactylus.fcp.WatchGlobal; import net.pterodactylus.util.thread.ObjectWrapper; /** @@ -565,7 +564,6 @@ public class FcpClient { @Override @SuppressWarnings("synthetic-access") public void run() throws IOException { - fcpConnection.sendMessage(new WatchGlobal(global)); fcpConnection.sendMessage(new ListPersistentRequests()); } @@ -574,7 +572,9 @@ public class FcpClient { */ @Override public void receivedPersistentGet(FcpConnection fcpConnection, PersistentGet persistentGet) { - getRequests.add(persistentGet); + if (!persistentGet.isGlobal() || global) { + getRequests.add(persistentGet); + } } /**