diff options
author | Vitaly Takmazov | 2016-06-30 12:29:38 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-06-30 12:29:38 +0300 |
commit | e0d4d97777962c6f1752d7772b57392ec53dfc21 (patch) | |
tree | 1d1a6e4c2ef14f03dac88b40358ad03c51ca8a7d /src/main/java/com/juick/ws/WebsocketComponent.java | |
parent | 1f82412b053dce31d01e0c384bd18ad3b9e101ec (diff) |
allow anonymous replies
Diffstat (limited to 'src/main/java/com/juick/ws/WebsocketComponent.java')
-rw-r--r-- | src/main/java/com/juick/ws/WebsocketComponent.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/juick/ws/WebsocketComponent.java b/src/main/java/com/juick/ws/WebsocketComponent.java index d38f7b69..daf17753 100644 --- a/src/main/java/com/juick/ws/WebsocketComponent.java +++ b/src/main/java/com/juick/ws/WebsocketComponent.java @@ -97,7 +97,10 @@ public class WebsocketComponent extends TextWebSocketHandler { } } if (sockSubscr != null) { - clients.add(sockSubscr); + synchronized (clients) { + clients.add(sockSubscr); + logger.info(clients.size() + " clients connected"); + } } } @Override @@ -110,6 +113,7 @@ public class WebsocketComponent extends TextWebSocketHandler { } return false; }); + logger.info(clients.size() + " clients connected"); } } |