private TDHSResponse[] do_real_response(ArrayBlockingQueue<BasePacket> queue) throws TDHSException {
BasePacket ret = null;
try {
ret = queue.poll(getTimeOut(), TimeUnit.MILLISECONDS);
if (ret == null) {
throw new TDHSTimeoutException("TimeOut");
}
if (!TDHSResponseEnum.ClientStatus.MULTI_STATUS.equals(ret.getClientStatus())) {
if (ret.getClientStatus() != null && ret.getClientStatus().getStatus() >= 400 &&
ret.getClientStatus().getStatus() < 600) {
throw new TDHSBatchException(