protected byte @Nullable [] executeCommand(String command, byte[] request,
Function<byte[], Boolean> validateResponse) {
- byte[] buffer = new byte[2028];
- int bytesRead;
-
try {
if (!REQUEST_LOCK.tryLock(30, TimeUnit.SECONDS)) {
- logger.trace("executeCommand({}): time out while getting lock", command);
+ logger.debug("executeCommand({}): timed out while getting the lock", command);
return null;
}
+ } catch (InterruptedException e) {
+ logger.debug("executeCommand({}): was interrupted while getting the lock", command);
+ return null;
+ }
+
+ byte[] buffer = new byte[2028];
+ int bytesRead;
+
+ try {
Socket socket = getConnection();
if (socket == null) {
return null;