diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/push/ClientPresenceManager.java b/service/src/main/java/org/whispersystems/textsecuregcm/push/ClientPresenceManager.java index e8908454c..a165725cf 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/push/ClientPresenceManager.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/push/ClientPresenceManager.java @@ -38,6 +38,9 @@ import static com.codahale.metrics.MetricRegistry.name; * The client presence manager keeps track of which clients are actively connected and "present" to receive messages. * Only one client per account/device may be present at a time; if a second client for the same account/device declares * its presence, the previous client is displaced. + *

+ * The client presence manager depends on Redis keyspace notifications and requires that the Redis instance support at + * least the following notification types: {@code K$z}. */ public class ClientPresenceManager extends RedisClusterPubSubAdapter implements Managed { @@ -146,8 +149,8 @@ public class ClientPresenceManager extends RedisClusterPubSubAdapter { final RedisAdvancedClusterCommands commands = connection.sync(); - commands.set(presenceKey, managerId); commands.sadd(connectedClientSetKey, presenceKey); + commands.set(presenceKey, managerId); }); subscribeForRemotePresenceChanges(presenceKey);