fix #655 Repeated subscriptions result in multiple callbacks#674
fix #655 Repeated subscriptions result in multiple callbacks#674yesAnd92 wants to merge 5 commits intonacos-group:masterfrom
Conversation
binbin0325
left a comment
There was a problem hiding this comment.
use error, you can define the SubscribeParam variable and pass it to Subscribe,Unsubscribe
|
Add duplicate check during subscription |
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #674 +/- ##
==========================================
+ Coverage 29.71% 29.93% +0.21%
==========================================
Files 40 40
Lines 3093 3097 +4
==========================================
+ Hits 919 927 +8
+ Misses 2104 2102 -2
+ Partials 70 68 -2
☔ View full report in Codecov by Sentry. |
|
@binbin0325 这个pr是否符合要求?pending好久了 |
符合要求,本周再重点看下 |
bug
初始化vo.SubscribeParam的SubscribeCallback属性时是值传递,导致"订阅”和"取消订阅"两次请求传入的回调函数不同,取消订阅逻辑总无法清除对应的callback从而产生这个bug #655。
fix
将SubscribeCallback定义为指针类型的函数,保证"取消订阅"请求时两次回调函数符合相等性的判断。
result