Skip to content

Commit bc6ec80

Browse files
committed
Worker does not get jobs if job payload in size ~65480-65510 bytes veny#55
1 parent f3fa6c9 commit bc6ec80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/gearmanode/job-server.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,12 @@ JobServer.prototype._processData = function (chunk) {
300300
return;
301301
}
302302

303-
if (chunk.length < protocol.CONSTANTS.HEADER_LEN) { // it's only header fragment, the rest should come in next packet
303+
if (chunk.length < protocol.CONSTANTS.HEADER_LEN && chunk[0] == '00') { // it's only header fragment, the rest should come in next packet
304304
this.headerfrag = chunk;
305305
return;
306306
}
307307

308-
if (chunk.readUInt32BE(0) !== protocol.CONSTANTS.HEADER_RESP) {
308+
if (chunk[0] != '00' || chunk.readUInt32BE(0) !== protocol.CONSTANTS.HEADER_RESP) {
309309
if (this.hasOwnProperty('segmentedPacket')) {
310310
chunk = Buffer.concat([this.segmentedPacket, chunk]);
311311
} else if (this.hasOwnProperty('headerfrag')) {

0 commit comments

Comments
 (0)