Disconnection handling in telnetserver