}
}
}
catch (InterruptedException e)
{
throw new HornetQInterruptedException(e);
}
}
response = null;
if (resendCache != null && packet.isRequiresConfirmations())
{
resendCache.add(packet);
}
connection.getTransportConnection().write(buffer, false, false);
long toWait = connection.getBlockingCallTimeout();
long start = System.currentTimeMillis();
while (!closed && response == null && toWait > 0)
{
try
{
sendCondition.await(toWait, TimeUnit.MILLISECONDS);
}
catch (InterruptedException e)
{
throw new HornetQInterruptedException(e);
}
if (closed)
{
break;