On Thu, 1 Dec 2022 11:03:44 GMT, Darragh Clarke <d...@openjdk.org> wrote:

>> Currently if a `HttpResonseInputStream` gets interrupted while reading it 
>> will just swallow the exception and continue,
>> 
>> This PR changes it to close the stream and throw an IOException, I added a 
>> test to cover this which just uses two threads to read the stream then 
>> interrupt it.
>
> Darragh Clarke has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   removed changes from Utils

src/java.net.http/share/classes/jdk/internal/net/http/ResponseSubscribers.java 
line 488:

> 486:                         close();
> 487:                     } catch (IOException ignored) {
> 488:                     }

This will swallow the interrupt status, you' need to do 
Thread.currentThread().interrupt() before throwing the IOException.

-------------

PR: https://git.openjdk.org/jdk/pull/11323

Reply via email to