From 917eb1de0b2f4f75ea40ca46e32b164cd6b2338f Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 18 Feb 2015 11:52:59 -0500 Subject: [PATCH] Ignore Pong messages in StompSubProtocolHandler Issue: SPR-12728 --- .../web/socket/messaging/StompSubProtocolHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java index cee91afde4..4f38ec66c1 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; @@ -200,7 +201,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE byteBuffer = ((BinaryMessage) webSocketMessage).getPayload(); } else { - throw new IllegalArgumentException("Unexpected WebSocket message type: " + webSocketMessage); + return; } BufferingStompDecoder decoder = this.decoders.get(session.getId());