aboutsummaryrefslogtreecommitdiff
path: root/juick-server-web/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-11-03 10:18:27 +0300
committerGravatar Vitaly Takmazov2017-11-03 10:18:27 +0300
commit24229d53cbbda68bb2becafb63ee5b1484f5ea75 (patch)
tree00bb2863686dfce7ca313fe4c65cf5770d6d60f8 /juick-server-web/src/main
parent400f4d6d26cac27e24e3c783a8f84b84811e5e47 (diff)
server-web: do not publish disconnected event when destroying
Diffstat (limited to 'juick-server-web/src/main')
-rw-r--r--juick-server-web/src/main/java/com/juick/server/component/JuickServerComponent.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server-web/src/main/java/com/juick/server/component/JuickServerComponent.java b/juick-server-web/src/main/java/com/juick/server/component/JuickServerComponent.java
index 71e81f2d..792f446f 100644
--- a/juick-server-web/src/main/java/com/juick/server/component/JuickServerComponent.java
+++ b/juick-server-web/src/main/java/com/juick/server/component/JuickServerComponent.java
@@ -59,7 +59,7 @@ public class JuickServerComponent extends TextWebSocketHandler {
if (session != null && session.isOpen()) {
logger.debug("Sending WebSocket ping");
session.sendMessage(new PingMessage());
- } else {
+ } else if (!closeFlag.get()) {
applicationEventPublisher.publishEvent(new DisconnectedEvent(this));
}
}