Skip to content

Commit

Permalink
Fix add headers
Browse files Browse the repository at this point in the history
  • Loading branch information
NaikSoftware committed May 11, 2016
1 parent 15546fc commit 3adaa2f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public void connect(List<StompHeader> _headers) {
.subscribe(lifecycleEvent -> {
switch (lifecycleEvent.getType()) {
case OPENED:
List<StompHeader> headers = Arrays.asList(new StompHeader(StompHeader.VERSION, SUPPORTED_VERSIONS));
List<StompHeader> headers = new ArrayList<>();
headers.add(new StompHeader(StompHeader.VERSION, SUPPORTED_VERSIONS));
if (_headers != null) headers.addAll(_headers);
mConnectionProvider.send(new StompMessage(StompCommand.CONNECT, headers, null).compile())
.subscribe();
Expand Down

0 comments on commit 3adaa2f

Please sign in to comment.