Skip to content

Commit 737aa94

Browse files
authored
Close exchanges in HttpClientTests (elastic#115059) (elastic#115460)
1 parent 17ee04c commit 737aa94

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/ingest-geoip/src/test/java/org/elasticsearch/ingest/geoip/HttpClientTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static void startServer() throws Throwable {
4646
server.createContext("/404/", exchange -> {
4747
try {
4848
exchange.sendResponseHeaders(404, 0);
49+
exchange.close();
4950
} catch (Exception e) {
5051
fail(e);
5152
}
@@ -101,6 +102,7 @@ public boolean checkCredentials(String username, String password) {
101102
exchange.getResponseHeaders().add("Location", "/" + destination + "/");
102103
}
103104
exchange.sendResponseHeaders(302, 0);
105+
exchange.close();
104106
} catch (Exception e) {
105107
fail(e);
106108
}

0 commit comments

Comments
 (0)