I am writing a remote in java which opens a socket connection to send the telnet ECP commands. However, if I drop the connection ungracefully (wifi lost, phone crash, etc), the Roku seems to keep that connection open. Until i reboot the Roku, i cannot initiate another telnet connection.
Any ideas how I can manage my socket connection to prevent this?