I have an HttpURLConnection that talks to a partner system which sometimes never responds. The code to read the response hangs forever. I'd like to impose my own timeout on the wait so I handed the connection to a timer tasks that waits 30 seconds and then calls disconnect() on the connection. This doesn't interrup the main
thread, though.
Given an HttpURLConnection, any idea how I can blow the sucker up? Or maybe kill the other thread?