-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MXCallManager: Make call transfer requests sequential #1739
Conversation
93c9854
to
c6aa99e
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## develop #1739 +/- ##
============================================
+ Coverage 17.67% 37.51% +19.83%
============================================
Files 612 612
Lines 96547 96554 +7
Branches 40518 41731 +1213
============================================
+ Hits 17066 36220 +19154
+ Misses 78968 59285 -19683
- Partials 513 1049 +536
... and 196 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
[callWithTarget transferToRoom:nil | ||
user:transferee | ||
createCall:nil | ||
awaitCall:newCallId | ||
success:^(NSString * _Nonnull eventId) { | ||
dispatch_group_leave(dispatchGroupReplaces); | ||
dispatch_group_leave(dispatchGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you also need to leave the dispatch group in case of failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely do not want to make the next request if the first one failed.
Does it create an issue (like a retain cycle) if we let the dispatch_group
open?
The code before was worse. It could generate 2 calls of the failure
callback without "releasing" the dispatch group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it create an issue (like a retain cycle) if we let the dispatch_group open
This is what I meant.
A dispatch group with a work count equal to "one" will stick somewhere forever I guess.
But I can't find easily a confirmation of this (DispatchGroup objects don't work as normal ARC objects).
Btw I don't see it as a huge problem, I'm going to approve it anyway.
[callWithTarget transferToRoom:transferRoom.roomId | ||
user:transferee | ||
createCall:nil | ||
awaitCall:newCallId | ||
success:^(NSString * _Nonnull eventId) { | ||
dispatch_group_leave(dispatchGroupReplaces); | ||
dispatch_group_leave(dispatchGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem here
Make sure we made requests one by one to avoid to create weird scenarii.