X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2Fhighlevel%2FFcpClient.java;h=aa2c8f15dcb6f2ffa3d3e0f125c7381dbc931e44;hb=fa22404c6b514de83828117b9885a1da1a851481;hp=dae7546f8e39fcc673a6bd778a1ef64b91afbbdb;hpb=5a6f76df163e8fb00a36bb14088cab8f36c94f13;p=jFCPlib.git diff --git a/src/net/pterodactylus/fcp/highlevel/FcpClient.java b/src/net/pterodactylus/fcp/highlevel/FcpClient.java index dae7546..aa2c8f1 100644 --- a/src/net/pterodactylus/fcp/highlevel/FcpClient.java +++ b/src/net/pterodactylus/fcp/highlevel/FcpClient.java @@ -165,6 +165,8 @@ public class FcpClient { fcpConnection.connect(); ClientHello clientHello = new ClientHello(name); fcpConnection.sendMessage(clientHello); + WatchGlobal watchGlobal = new WatchGlobal(true); + fcpConnection.sendMessage(watchGlobal); } /** @@ -565,7 +567,6 @@ public class FcpClient { @Override @SuppressWarnings("synthetic-access") public void run() throws IOException { - fcpConnection.sendMessage(new WatchGlobal(global)); fcpConnection.sendMessage(new ListPersistentRequests()); } @@ -574,7 +575,9 @@ public class FcpClient { */ @Override public void receivedPersistentGet(FcpConnection fcpConnection, PersistentGet persistentGet) { - getRequests.add(persistentGet); + if (!persistentGet.isGlobal() || global) { + getRequests.add(persistentGet); + } } /**