From 24229d53cbbda68bb2becafb63ee5b1484f5ea75 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 3 Nov 2017 10:18:27 +0300 Subject: server-web: do not publish disconnected event when destroying --- .../src/main/java/com/juick/server/component/JuickServerComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server-web/src/main/java/com/juick/server') 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)); } } -- cgit v1.2.3