Skip to content

Commit 5f404f8

Browse files
author
Eugen Freiter
committed
fix typo and add some logging
Signed-off-by: Eugen Freiter <freiter@gmx.de>
1 parent 4b8ba89 commit 5f404f8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/io/github/hapjava/server/impl/connections/SubscriptionManager.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public synchronized void completeUpdateBatch() {
104104
HttpResponse message = new EventController().getMessage(entry.getValue());
105105
entry.getKey().outOfBand(message);
106106
} catch (Exception e) {
107-
LOGGER.error("Faled to create new event message", e);
107+
LOGGER.error("Failed to create new event message", e);
108108
}
109109
}
110110
pendingNotifications.clear();
@@ -113,7 +113,10 @@ public synchronized void completeUpdateBatch() {
113113

114114
public synchronized void publish(int accessoryId, int iid, EventableCharacteristic changed) {
115115
final Set<HomekitClientConnection> subscribers = subscriptions.get(changed);
116-
if ((subscribers == null) || (subscribers.isEmpty())) return; // no subscribers
116+
if ((subscribers == null) || (subscribers.isEmpty())) {
117+
LOGGER.debug("No subscribers to characteristic {} at accessory {} ", changed, accessoryId);
118+
return; // no subscribers
119+
}
117120
if (nestedBatches != 0) {
118121
LOGGER.debug("Batching change for " + accessoryId);
119122
PendingNotification notification = new PendingNotification(accessoryId, iid, changed);

0 commit comments

Comments
 (0)