Send final packet immediately.

Rather than waiting for it to be sent on the next pass through the
loop.

Change-Id: If77bf1e0be6946d6a0b5db33cec5d1caf98cd058
This commit is contained in:
James E. Blair 2013-06-14 17:28:08 -07:00
parent 474afb007b
commit 352664ee95

View File

@ -574,6 +574,16 @@ public class MyGearmanWorkerImpl implements GearmanSessionEventHandler {
// make it as far as the schedule job unlock.
availability.unlock(this);
}
// We should have submitted either a WORK_EXCEPTION, COMPLETE,
// or FAIL; make sure it gets sent.
try {
session.driveSessionIO();
} catch (IOException ioe) {
LOG.warn("Received IOException while driving" +
" IO on session " + session, ioe);
session.closeSession();
}
}
private GearmanPacketType getGrabJobPacketType() {