Skip to content

socket.io redis store leaks channels #663

Closed
@brettkiefer

Description

@brettkiefer

Repro:

Socket.io 0.8.7
Run socket.io with the redis backing store.
run 'info' on your redis instance, noting the number of pubsub_channels
Create a websocket connection to socket.io
run 'info' again: you should now have 5 more pubsub_channels than before
Close the websocket connection
run 'info' again: you now have 3 more pubsub_channels than when you started

Repeat -- it leaks 3 channels each time.

Is this intended?

This line would cause it to leak 2 channels, because we're not unsubscribing in the non-local case https://github.com/LearnBoost/socket.io/blob/master/lib/manager.js#L516

But even if I remove the if (local) logic, I still leak one channel per opened and closed connection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions