Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Telnet Client fails to detect server disconnect during machine reboot

 
lydia edward
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written a telnet client that establishes a telnet session with the help of org.apache.commons.net.telnet.TelnetClient to the server and it monitors a particular file. It reads the latest contents written to that file using the tail -F command . The problem I am facing is that the blocking call inputStream.read(int) does not throw an exception when the telnet server machine reboots, but when network cable is unplugged an IOException is thrown.
Due to this behavior my program fails to receive the updates from the file after a machine reboot. Even the telnetClientObject.isConnected() returns true while the machine is rebooting.

Can you please suggest ways to rectify this issue?

Any help will be appreciated. Thanks in advance

-Lydia
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic