Skip to content

Commit

Permalink
multiple users subscribe to channels at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Aug 9, 2021
1 parent d68692a commit 2aedab9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Api/WebSocket/SocketGlobal.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ protected function addSubUpdate($data=[]){
}else{
foreach ($new_value as $k=>$v){
foreach ($data as $dk=>$dv){
if($v[0]==$dv[0] && $v[1]['key']==$dv[1]['key']){
if($v[0]==$dv[0]){
if(isset($v[1]['key']) && $v[1]['key']!=$dv[1]['key']) continue;
unset($data[$dk]);
unset($new_value[$k]);
}
Expand Down

0 comments on commit 2aedab9

Please sign in to comment.