Commit 05c5096f authored by AntoninCoulibaly's avatar AntoninCoulibaly Committed by GitHub
Browse files

Merge pull request #16 from lamphamsy/ft/parsePDU

distinguish between request and response pdu
parents 552bfa97 54d92f24
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1632,7 +1632,8 @@ function parsePDU(socket, callback) {
                const pdu = new PDU(
                    Buffer.concat([header, rawData], HEADER_SZ + protobufSize));
                let error;
                if (pdu.getMessageType() !== ops.NOOP) {
                if (pdu.getCommand().status &&
                    pdu.getMessageType() !== ops.NOOP) {
                    error = (pdu.getStatusCode() === errors.SUCCESS) ? null :
                        pdu.getErrorMessage();
                }