troyzhxu/okhttps

Stomp 能否提供某一个destination是否已经订阅的函数?

sanpark opened this issue · 4 comments

stomp unsubscribe和subscribe出现
java.lang.IllegalStateException: The destination [/user/00f6d11e26-d49a-40e4-b39d-6bf2742ee8dc/message] has already been subscribed
直接崩溃,希望提供函数来处理IllegalStateException

不要重复订阅就不会报这个错了

关键自己写的断线重连容易碰到这个问题,有木有断线重连的最佳实践?

还有就是如果使用stomp断线过,重连使用 stomp.connect(headers); 发现还是接收不到信息

v3.4.6 中已经对这个问题做了优化了:
https://github.com/ejlchina/okhttps/releases/tag/v3.4.6