Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #572
Closed
Open
Issue created Jun 13, 2017 by Administrator@rootContributor

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!

Assignee
Assign to
Time tracking