Skip to content

[BUG] socket-io当redis配置options->\Redis::OPT_PREFIX导致广播失败 #2912

@DlenoDing

Description

@DlenoDing

Execute the command and paste the result below.

Command: uname -a && php -v && composer info | grep hyperf && php --ri swoole

Linux localhost.localdomain 3.10.0-1160.6.1.el7.x86_64 #1 SMP Tue Nov 17 13:59:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
PHP 7.2.34 (cli) (built: Oct  1 2020 13:37:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies
Do not run Composer as root/super user! See https://getcomposer.org/root for details
dleno/hyperf-aliyun-acm              v2.1.8  An aliyun acm adapter for Hyperf config component.
donjan-deng/hyperf-casbin            2.0.0   An authorization library that supports access control models like ACL, RBAC, ABAC in hyperf. 
hyperf/cache                         v2.0.9  A cache component for hyperf.
hyperf/command                       v2.0.10 Command for hyperf
hyperf/config                        v2.0.9  An independent component that provides configuration container.
hyperf/contract                      v2.0.13 The contracts of Hyperf.
hyperf/crontab                       v2.0.21 A crontab component for Hyperf.
hyperf/database                      v2.0.21 A flexible database library.
hyperf/db-connection                 v2.0.20 A hyperf db connection handler for hyperf/database.
hyperf/devtool                       v2.0.21 A Devtool for Hyperf.
hyperf/di                            v2.0.19 A DI for Hyperf.
hyperf/dispatcher                    v2.0.19 A HTTP Server for Hyperf.
hyperf/event                         v2.0.10 an event manager that implements PSR-14.
hyperf/exception-handler             v2.0.13 Exception handler for hyperf
hyperf/framework                     v2.0.11 A coroutine framework that focuses on hyperspeed and flexible, specifically use for build ...
hyperf/guzzle                        v2.0.21 Swoole coroutine handler for guzzle
hyperf/http-message                  v2.0.20 microservice framework base on swoole
hyperf/http-server                   v2.0.19 A HTTP Server for Hyperf.
hyperf/logger                        v2.0.11 A logger component for hyperf.
hyperf/memory                        v2.0.12 An independent component that use to operate and manage memory.
hyperf/model-listener                v2.0.12 A model listener for Hyperf.
hyperf/paginator                     v2.0.17 A paginator component for hyperf.
hyperf/pool                          v2.0.12 An independent universal connection pool component.
hyperf/process                       v2.0.13 A process component for hyperf.
hyperf/redis                         v2.0.18 A redis component for hyperf.
hyperf/server                        v2.0.20 A base server library for Hyperf.
hyperf/signal                        v2.0.13 A signal library for Hyperf.
hyperf/socketio-server               v2.0.13 Socket.io implementation for hyperf
hyperf/testing                       v2.0.14 Testing for hyperf
hyperf/translation                   v2.0.18 An independent translation component, forked by illuminate/translation.
hyperf/utils                         v2.0.21 A tools package that could help developer solved the problem quickly.
hyperf/validation                    v2.0.17 hyperf validation
hyperf/watcher                       v2.0.21
hyperf/websocket-server              v2.0.18 A websocket server library for Hyperf.
qbhy/hyperf-multi-env                v2.1   

swoole

Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 4.5.8
Built => Nov 23 2020 12:07:32
coroutine => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.0.2k-fips  26 Jan 2017
http2 => enabled
pcre => enabled
zlib => 1.2.7
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
mysqlnd => enabled
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608

Description:

socket-io当redis配置options->\Redis::OPT_PREFIX导致广播失败,去除这个配置就正常了。
看代码好像是SubscriberFactory里创建Subscriber,只用到了host,pass,port.
Subscriber又不是hyperf的组件

Steps To Reproduce:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions