StreamingContextImpl fails on restoring listener
selivonchik opened this issue · 1 comments
Candles subscription is created for multiple instruments with default parallelism settings (i.e. 6).
After some time all clients are failing with ConcurrentModificationException as follows:
2022-01-04 10:43:54,218 [OkHttp WebSocket https://api-invest.tinkoff.ru/... ping] INFO r.t.i.o.o.StreamingContextImpl - У клиента #5 активно 733 подписок
2022-01-04 10:43:54,222 [OkHttp WebSocket https://api-invest.tinkoff.ru/... ping] ERROR r.t.i.o.o.StreamingContextImpl - При восстановлении Streaming API клиента #5 что-то произошло
java.util.ConcurrentModificationException: null
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1584) ~[?:?]
at java.util.HashMap$KeyIterator.next(HashMap.java:1607) ~[?:?]
at ru.tinkoff.invest.openapi.okhttp.StreamingContextImpl.restore(StreamingContextImpl.java:103) ~[openapi-java-sdk-java8-0.5.1.jar!/:?]
at ru.tinkoff.invest.openapi.okhttp.StreamingContextImpl.access$700(StreamingContextImpl.java:24) ~[openapi-java-sdk-java8-0.5.1.jar!/:?]
at ru.tinkoff.invest.openapi.okhttp.StreamingContextImpl$StreamingApiListener.onFailure(StreamingContextImpl.java:180) [openapi-java-sdk-java8-0.5.1.jar!/:?]
at okhttp3.internal.ws.RealWebSocket.failWebSocket(RealWebSocket.kt:592) [okhttp-4.9.3.jar!/:?]
at okhttp3.internal.ws.RealWebSocket.writePingFrame$okhttp(RealWebSocket.kt:563) [okhttp-4.9.3.jar!/:?]
at okhttp3.internal.ws.RealWebSocket$initReaderAndWriter$$inlined$synchronized$lambda$1.runOnce(TaskQueue.kt:219) [okhttp-4.9.3.jar!/:?]
at okhttp3.internal.concurrent.TaskRunner.runTask(TaskRunner.kt:116) [okhttp-4.9.3.jar!/:?]
at okhttp3.internal.concurrent.TaskRunner.access$runTask(TaskRunner.kt:42) [okhttp-4.9.3.jar!/:?]
at okhttp3.internal.concurrent.TaskRunner$runnable$1.run(TaskRunner.kt:65) [okhttp-4.9.3.jar!/:?]
Closing issue due repo freezing