Skip to content

Commit

Permalink
workers: fix ErrorResultPacket.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Aug 17, 2017
1 parent a91bd5c commit 411db44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/workers/packets.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ Object.setPrototypeOf(ErrorResultPacket.prototype, ErrorPacket.prototype);

ErrorResultPacket.prototype.cmd = packetTypes.ERRORRESULT;

ErrorResultPacket.fromRaw = function fromRaw(data) {
const packet = new ErrorResultPacket();
const p = ErrorPacket.fromRaw(data);
packet.error = p.error;
return packet;
};

/**
* CheckPacket
* @constructor
Expand Down

0 comments on commit 411db44

Please sign in to comment.