Skip to content

Commit

Permalink
Move check for end of reply sequence from callback to handler
Browse files Browse the repository at this point in the history
  • Loading branch information
real-alexei committed May 6, 2016
1 parent 5ef294e commit 0c127d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/xcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ XClient.prototype.expectReplyHeader = function()
var result = unpack.call(client, data, opt_data);
var callback = handler[1];
var multiReply = handler[2];
var handled = callback(null, result);
if (!multiReply || handled) {
callback(null, result);
if (!multiReply || result === undefined) {
delete client.replies[seq_num];
}
}
Expand Down

0 comments on commit 0c127d5

Please sign in to comment.