aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-feed-client
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-06-28 13:16:33 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-06-28 13:16:33 +0200
commitaf4891e7c47634a9b36fd07ef672fb49d4d5e9ed (patch)
treedcf36e7cb99241e39dfe66c725bd391260f0bd80 /vespa-feed-client
parentdd4213f72dbcc6a0dd40fb4e0a20a1aebb01d342 (diff)
Actually reject new operations after close() is called
Diffstat (limited to 'vespa-feed-client')
-rw-r--r--vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java b/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java
index e3a8a6af9b0..143f51a9bf7 100644
--- a/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java
+++ b/vespa-feed-client/src/main/java/ai/vespa/feed/client/HttpFeedClient.java
@@ -76,6 +76,9 @@ class HttpFeedClient implements FeedClient {
}
private CompletableFuture<Result> send(String method, DocumentId documentId, String operationJson, OperationParameters params) {
+ if (closed.get())
+ throw new IllegalStateException("Client is closed");
+
HttpRequest request = new HttpRequest(method,
getPath(documentId) + getQuery(params),
requestHeaders,