Skip to content

Commit

Permalink
Always store consumer function.
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Jun 11, 2011
1 parent 2066aef commit 19a0fb6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/stores/memory.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,12 @@ Client.prototype.count = function (fn) {
*/

Client.prototype.consume = function (fn) {
this.consumer = fn;
this.paused = false;

if (this.buffer.length) {
fn(this.buffer, null);
this.buffer = [];
} else {
this.consumer = fn;
}

return this;
Expand Down

0 comments on commit 19a0fb6

Please sign in to comment.