Skip to content

Commit 3adaa2f

Browse files
committed
Fix add headers
1 parent 15546fc commit 3adaa2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/main/java/ua/naiksoftware/stomp/client/StompClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public void connect(List<StompHeader> _headers) {
5151
.subscribe(lifecycleEvent -> {
5252
switch (lifecycleEvent.getType()) {
5353
case OPENED:
54-
List<StompHeader> headers = Arrays.asList(new StompHeader(StompHeader.VERSION, SUPPORTED_VERSIONS));
54+
List<StompHeader> headers = new ArrayList<>();
55+
headers.add(new StompHeader(StompHeader.VERSION, SUPPORTED_VERSIONS));
5556
if (_headers != null) headers.addAll(_headers);
5657
mConnectionProvider.send(new StompMessage(StompCommand.CONNECT, headers, null).compile())
5758
.subscribe();

0 commit comments

Comments
 (0)