if (msg != null) {
msgdata = msg.getChannelData();
currentPos = 0;
} else {
throw new MessageStoreEOFException();
}
} else {
SshMsgChannelData msg = null;
while ((msg == null) && !isClosed()) {
try {
log.debug("Waiting for channel data");
msg = (SshMsgChannelData) messageStore.getMessage(filter,
interrupt);
} catch (MessageNotAvailableException ex1) {
// Ignore the timeout but this allows us to review the
// InputStreams state once in a while
}
}
if (msg != null) {
msgdata = msg.getChannelData();
currentPos = 0;
} else {
throw new MessageStoreEOFException();
}
}
} finally {
stopBlockingOperation();
}