-
Notifications
You must be signed in to change notification settings - Fork 658
[2.x] Fix unsubscribeFromAllChannels leaving stale connections #708
Conversation
the `each->` call silently ran only for the first channel leading to users on other channels seeming randomly not getting unsubscribed, stale connections, a frustrated dev and a fishy smell all over the place. after some serious hours of debugging and searching for this sneaky bug the websocket-world is now a better place ;)
Codecov Report
@@ Coverage Diff @@
## master #708 +/- ##
============================================
+ Coverage 90.71% 90.73% +0.01%
Complexity 2 2
============================================
Files 60 60
Lines 1691 1694 +3
============================================
+ Hits 1534 1537 +3
Misses 157 157
Continue to review full report at Codecov.
|
Maybe not the right place for this, but if you don't mind sharing why exactly did this fix the issue? I might be blind but aren't the changes just syntactic? What about higher order messages in collections was causing this to fail? Thanks! |
This is a good question but I didn't went down the rabbithole, i was too happy this finally worked. |
if i understand it correctly the each gets a when unsubscription of a channel is not successfull laravel-websockets/src/Channels/Channel.php Lines 111 to 113 in efb3aa8
so thats the issue i guess - what do you think? |
I'm having the same issue and this PR does solve the problem. |
pls merge |
May address issues around scaling and stale connections beyondcode/laravel-websockets#708
May address issues around scaling and stale connections beyondcode/laravel-websockets#708
the
each->
call silently ran only until the first channel was a unable to unsubscribe the connectionleading to users on other channels seeming randomly not getting unsubscribed,
stale connections, a frustrated dev and a fishy smell all over the place.
after some serious hours of debugging and searching for this sneaky bug
the websocket-world is now a better place ;)
please merge ASAP, this is relevant for basically all setups that use more than one channel!
should fix e.g. #654, #657, #623 and propably #228,
edit:
fixed description