swap connections fail with strange errors with keep-alive enabled

This commit is contained in:
Hans-Christoph Steiner 2018-08-06 22:42:39 +02:00
parent 57a00938a0
commit f56fbf4dcb

View File

@ -167,6 +167,7 @@ public class HttpDownloader extends Downloader {
if (isSwapUrl(sourceUrl)) {
// swap never works with a proxy, its unrouted IP on the same subnet
connection = (HttpURLConnection) sourceUrl.openConnection();
connection.setRequestProperty("Connection", "Close"); // avoid keep-alive
} else {
if (queryString != null) {
connection = NetCipher.getHttpURLConnection(new URL(urlString + "?" + queryString));