I\'m using HttpURLConnection on the client side to consume a response in an HTTP streaming (server push) situation. Although the server may close the co
Another workaround is to wrap the input stream in a Channel and use that (Channels.newChannel
), as suggested in the workaround to JDK-4329256. That will cause the underlying input stream to be closed when the thread is interrupted. However, there is a comment in the JDK that its not really interruptible. In my testing it seems to work. I've asked here for more information.