Re utilizing redis connections causes an error when trying to close multiple queues.
Created by: lebobbi
let opts = {
createClient: function(type){
switch(type){
case 'client':
return rClient;
case 'subscriber':
return rSubscriber;
default:
return new Redis();
}
}
}
let qA = new Queue('A', opts);
let qB = new Queue('B', opts);
qA.close();
qB.close();
this will result in error
Unhandled rejection Error: Connection is closed. at close (/project/node_modules/ioredis/lib/redis/event_handler.js:101:21) at Socket. (/mnt/c/Users/carlo/Projects/parse-general/node_modules/ioredis/lib/redis/event_handler.js:76:14) at Socket.g (events.js:292:16) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at TCP._handle.close [as _onclose] (net.js:497:12)
Should I content with just closing one queue? What will happen with that third Redis connection?
Thanks for your hard work!