#70 Infinite loop and fix

0.2.4
closed-wont-fix
nobody
J2SSH (50)
5
2013-12-14
2006-12-12
hellpost
No

There is a bug in com.sshtools.j2ssh.connection.ChannelInputStream causing an endless loop. To fix it on line 316 I've thrown an Exception and that fixes it. Logically once the timeout has occured (interrupt) an no more data is found it should stop waiting.

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
throw new MessageStoreEOFException();
}
}

Discussion

  • Sascha Hunold
    Sascha Hunold
    2013-12-14

    I am closing this one as it is related to #83.

     
  • Sascha Hunold
    Sascha Hunold
    2013-12-14

    • status: open --> closed-wont-fix