throw new ICPException("Upsetting dispatching order");
}
waitingForFlush = false;
// Wait for the connection to deliver outgoing commands to be ready
Connection c = getOutgoingCommandsConnection();
// Send the command to the front-end
JICPPacket cmd = new JICPPacket(JICPProtocol.COMMAND_TYPE, JICPProtocol.DEFAULT_INFO, payload);
int sid = nextOutgoingCommandSid;
nextOutgoingCommandSid = increment(nextOutgoingCommandSid);
if (myLogger.isLoggable(Logger.FINE)) {
myLogger.log(Logger.FINE, myID+" - Delivering outgoing command to front-end. SID = " + sid);
}
cmd.setSessionID((byte) sid);
boolean deliverOK = false;
try {
c.writePacket(cmd);
close(c);
// Wait for the response
JICPPacket response = getResponse(RESPONSE_TIMEOUT + RESPONSE_TIMEOUT_INCREMENT * (cmd.getLength() / 1024));
deliverOK = true;
if (myLogger.isLoggable(Logger.FINE)) {