What happens if HttpClient.execute () is interrupted?

I am calling HttpClient.execute () on a background thread. Does an IOException cause a thread interrupt?

+3
source share
1 answer

No, at least I have never seen this. Please note that you can interrupt the download by checking Thread.currentThread().isInterrupted()while copying from httpEntity.getContent().

Recently discussed the closure of connections in other states http://old.nabble.com/Close-interrupt-HTTP-connections-td30299655.html

+1
source

Source: https://habr.com/ru/post/1764513/


All Articles