Skip to content

Commit d2cac6d

Browse files
committed
Use concurrent list instead ArrayList for deferred subscribers
1 parent cbe0cfa commit d2cac6d

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.util.Map;
1212
import java.util.Set;
1313
import java.util.UUID;
14+
import java.util.concurrent.CopyOnWriteArrayList;
1415

1516
import rx.Observable;
1617
import rx.Subscriber;
@@ -40,7 +41,7 @@ public class StompClient {
4041

4142
public StompClient(ConnectionProvider connectionProvider) {
4243
mConnectionProvider = connectionProvider;
43-
mWaitConnectionObservables = new ArrayList<>();
44+
mWaitConnectionObservables = new CopyOnWriteArrayList<>();
4445
}
4546

4647
/**

0 commit comments

Comments
 (0)