void () { try { while (true) { boolean read = readAvailableBlocking(); if (!read) { break; } else { if (isStopped) { break; } TimeoutUtil.sleep(mySleepingPolicy.getTimeToSleep(true)); } } } catch (Exception e) { onCommunicationError(); } finally { close(); onExit(); } }