throw new CruiseControlException("Trouble transmitting event " + events[ j ], e);
}
}
if (transmitter instanceof Gateway) {
Gateway gateway = (Gateway) transmitter;
try {
LOG.debug("Wait for empty queue...");
gateway.waitGatewayState(Transmitter.QUEUE_EMPTY);
LOG.debug("Done");
} catch (InterruptedException e) {
}
LOG.debug("Deallocating...");
try {
gateway.deallocate();
} catch (GatewayException e) {
LOG.warn("Error deallocation gateway: " + e.getMessage(), e);
}
LOG.debug("Done");
}