We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3fa6c9 commit bc6ec80Copy full SHA for bc6ec80
lib/gearmanode/job-server.js
@@ -300,12 +300,12 @@ JobServer.prototype._processData = function (chunk) {
300
return;
301
}
302
303
- if (chunk.length < protocol.CONSTANTS.HEADER_LEN) { // it's only header fragment, the rest should come in next packet
+ if (chunk.length < protocol.CONSTANTS.HEADER_LEN && chunk[0] == '00') { // it's only header fragment, the rest should come in next packet
304
this.headerfrag = chunk;
305
306
307
308
- if (chunk.readUInt32BE(0) !== protocol.CONSTANTS.HEADER_RESP) {
+ if (chunk[0] != '00' || chunk.readUInt32BE(0) !== protocol.CONSTANTS.HEADER_RESP) {
309
if (this.hasOwnProperty('segmentedPacket')) {
310
chunk = Buffer.concat([this.segmentedPacket, chunk]);
311
} else if (this.hasOwnProperty('headerfrag')) {
0 commit comments