projects
/
jFCPlib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable “WatchGlobal” mode directly after connecting.
[jFCPlib.git]
/
src
/
net
/
pterodactylus
/
fcp
/
highlevel
/
FcpClient.java
diff --git
a/src/net/pterodactylus/fcp/highlevel/FcpClient.java
b/src/net/pterodactylus/fcp/highlevel/FcpClient.java
index
dae7546
..
aa2c8f1
100644
(file)
--- 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);
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 {
@Override
@SuppressWarnings("synthetic-access")
public void run() throws IOException {
- fcpConnection.sendMessage(new WatchGlobal(global));
fcpConnection.sendMessage(new ListPersistentRequests());
}
fcpConnection.sendMessage(new ListPersistentRequests());
}
@@
-574,7
+575,9
@@
public class FcpClient {
*/
@Override
public void receivedPersistentGet(FcpConnection fcpConnection, PersistentGet persistentGet) {
*/
@Override
public void receivedPersistentGet(FcpConnection fcpConnection, PersistentGet persistentGet) {
- getRequests.add(persistentGet);
+ if (!persistentGet.isGlobal() || global) {
+ getRequests.add(persistentGet);
+ }
}
/**
}
/**