mirror of
https://github.com/apache/activemq.git
synced 2025-02-22 09:55:47 +00:00
Fix for AMQ-4857, added test for null before accessing protocol string
This commit is contained in:
parent
6ef202e020
commit
b601e172f7
@ -51,7 +51,7 @@ public class WSServlet extends WebSocketServlet {
|
|||||||
@Override
|
@Override
|
||||||
public WebSocket doWebSocketConnect(HttpServletRequest request, String protocol) {
|
public WebSocket doWebSocketConnect(HttpServletRequest request, String protocol) {
|
||||||
WebSocket socket;
|
WebSocket socket;
|
||||||
if (protocol.startsWith("mqtt")) {
|
if (protocol != null && protocol.startsWith("mqtt")) {
|
||||||
socket = new MQTTSocket();
|
socket = new MQTTSocket();
|
||||||
} else {
|
} else {
|
||||||
socket = new StompSocket();
|
socket = new StompSocket();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user