Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

queue poll fix

  • Loading branch information...
commit d2ec2aeecf181611dc6cf748e7e28bc791436809 1 parent d2ad51c
@pofallon authored
Showing with 4 additions and 6 deletions.
  1. +3 −5 lib/queue.js
  2. +1 −1  package.json
View
8 lib/queue.js
@@ -103,7 +103,7 @@ Queue.prototype.get = function(callback) {
if (err) {
callback(err);
} else if (messages.length > 0) {
- callback(null, messages[0], function() {
+ callback(null, messages[0].messagetext, function() {
that.del(messages[0]);
});
} else {
@@ -183,13 +183,11 @@ Queue.prototype.poll = function(opts, t) {
if (t > 0) {
this.interval = setInterval(function() {
- that.get(function(err,msg) {
+ that.get(function(err, msg, done) {
if (err) {
that.emit('error',err);
} else if (msg) {
- that.emit('message',msg[0], function() {
- that.del(msg[0]);
- });
+ that.emit('message',msg, done);
}
});
},t);
View
2  package.json
@@ -23,7 +23,7 @@
"loremipstream" : "0.0.x"
},
"engine": "node >= 0.6.0",
- "version": "0.6.1",
+ "version": "0.6.2",
"files": [
"index.js",
"lib",
Please sign in to comment.
Something went wrong with that request. Please try again.