-
Notifications
You must be signed in to change notification settings - Fork 490
Closed
Description
Hey,
I implemented a redis adapter in this way
var socketioPub = m_redis.createClient(null, null, { detect_buffers: true });
socketioPub.on('error', function (err) { ... });
var socketioSub = m_redis.createClient(null, null, { detect_buffers: true });
socketioSub.on('error', function (err) { ... });
io.adapter(m_socketio_redis({ pubClient: socketioPub, subClient: socketioSub }));So if the redis server e.g. is not running I can handle that error, but I get an unhandled error event from https://github.com/Automattic/socket.io-redis/blob/master/index.js#L73
[...]
function Redis(nsp){
Adapter.call(this, nsp);
var self = this;
sub.psubscribe(prefix + '#*', function(err){
if (err) self.emit('error', err); <--------------------------------
});
sub.on('pmessage', this.onmessage.bind(this));
}
[...]because there is no event listener attached and I see no way to attach one from the outside. Any ideas?
Best regards!
Metadata
Metadata
Assignees
Labels
No labels