Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 6b6197f

Browse files
fix unsubscribeFromAllChannels / stale connections
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 ;)
1 parent efb3aa8 commit 6b6197f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/ChannelManagers/LocalChannelManager.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ public function unsubscribeFromAllChannels(ConnectionInterface $connection): Pro
173173

174174
$this->getLocalChannels($connection->app->id)
175175
->then(function ($channels) use ($connection) {
176-
collect($channels)->each->unsubscribe($connection);
176+
collect($channels)
177+
->each(function (Channel $channel) use ($connection) {
178+
$channel->unsubscribe($connection);
179+
});
177180

178181
collect($channels)
179182
->reject->hasConnections()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /