Skip to content

Python-SocketIO >= 5.7.0 rejecting connections to namespaces created via external processes using Redis message broker #974

@Ghidra3x7

Description

@Ghidra3x7

Describe the bug
An external process is emitting events to a namespaces using Redis as the broker. When using python-socketio <= 5.6, Gunicorn, Flask-SocketIO==5.2.0 and python-engineio==4.3.3, the socketio client can connect to the namespace without a problem. When updating to python-socketio >= 5.7, the client does not connect. I believe (but not certain), this is due to change "Server refuses connections on unknown namespaces (#822)." I suspect that when an external process emits an event to a namespace using Redis as the message queue, the namespace is not "registered" and the server then refuses connections to the "unknown" namespace.

To Reproduce
Use an external process (and Flask-SocketIO) to emit an event to a namespace using Redis as the message broker. A web server (e.g. Gunicorn) loads Flask-SocketIO connects to the Redis broker. A client (using latest socketio 4.5+) tries to connect to the namespace; connection is refused.

Expected behavior
Python-SocketIO <= 5.6 works as expected - I can emit events via an external process to a namespace using Flask-SocketIO and Redis message broker; the client can connect to the namespace without a problem. Starting with 5.7+ , the connection is refused.

Logs

Not available at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions