LearnBoost/socket.io — Issue #663: socket.io redis store leaks channels
Author: brettkiefer
Created: 2011-11-23 21:51:24+00:00
State: open

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