File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
lib/src/main/java/ua/naiksoftware/stomp/client Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,17 @@ public StompClient(ConnectionProvider connectionProvider) {
4343 }
4444
4545 public void connect () {
46+ connect (null );
47+ }
48+
49+ public void connect (List <StompHeader > _headers ) {
4650 mConnectionProvider .getLifecycleReceiver ()
4751 .subscribe (lifecycleEvent -> {
4852 switch (lifecycleEvent .getType ()) {
4953 case OPENED :
50- mConnectionProvider .send (new StompMessage (StompCommand .CONNECT ,
51- Arrays .asList (new StompHeader (StompHeader .VERSION , SUPPORTED_VERSIONS )), null ).compile ())
54+ List <StompHeader > headers = Arrays .asList (new StompHeader (StompHeader .VERSION , SUPPORTED_VERSIONS ));
55+ if (_headers != null ) headers .addAll (_headers );
56+ mConnectionProvider .send (new StompMessage (StompCommand .CONNECT , headers , null ).compile ())
5257 .subscribe ();
5358 break ;
5459
You can’t perform that action at this time.
0 commit comments