Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Commit

Permalink
Add fix for handling null data. Thanks http://github.com/kschzt
Browse files Browse the repository at this point in the history
  • Loading branch information
akaspin authored and elbart committed Jul 15, 2010
1 parent f0ee20c commit acba975
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions memcache.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,11 @@ Client.prototype.handle_received_data = function () {
}

var callback = this.callbacks.shift();

if (result_value === null) {
throw "Error";
}

// fix from http://github.com/kschzt/node-memcache

this.buffer = this.buffer.substring(next_result_at);
if (callback.fun) {
if (callback != null && callback.fun != null) {
this.replies += 1;
callback.fun(result_value);
}
Expand Down

0 comments on commit acba975

Please sign in to comment.