Closed gregwebs closed 11 years ago
I'll look into this. Looks like this is a really old bug that doesn't usually get hit.
Any chance you have a small test project that hits this?
sorry, not from a test project, but code looks like this
queue = new MongoMQ({autoStart:true})
queue.on('upload', process)
queue.emit('upload', data)
Awesome I'll take a look around and see what I can find/fix.
this actually appears to be a normal path of execution to me unless handleResponse is not supposed to be used
Your fix is actually what I was looking at putting into place, was going to test it out first.
To answer your question, you normally would not call handleResponse directly as it is called by next whenever a new message is available on the queue. There isn't really a reason that you couldn't call handleResponse directly though.
I'm also going to cleanup and add the uprevs to the Readme before I merge this change on NPM will merge it here on Git first.
can you upload to npm?
3.4 is pushed with the changes to handleResponse, an updated readme.md, and package.json updates
Sorry, had a problem with a conflict at work so had to wait till I was home to do the actual publish.