Ensure http connection is closed after an announce (even if the .client config does not set Connection: close header).

This commit is contained in:
anthonyraymond 2017-02-19 21:12:14 +01:00
parent b34964638d
commit b03b29a79e

View file

@ -94,6 +94,7 @@ public class HTTPTrackerClient extends TrackerClient {
if (conn != null) {
in = conn.getErrorStream();
}
logger.trace("Tracker answer was an error: {}", ioe);
}
// At this point if the input stream is null it means we have neither a
@ -135,6 +136,7 @@ public class HTTPTrackerClient extends TrackerClient {
logger.warn("Problem ensuring error stream closed!", ioe);
}
}
conn.disconnect();
}
}