File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
vst/src/main/java/com/arangodb/vst Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 2020
2121package com .arangodb .vst ;
2222
23+ import com .arangodb .ArangoDBException ;
2324import com .arangodb .internal .InternalRequest ;
2425import com .arangodb .internal .InternalResponse ;
2526import com .arangodb .internal .net .CommunicationProtocol ;
@@ -45,6 +46,11 @@ public VstProtocol(final VstCommunicationAsync communication) {
4546
4647 @ Override
4748 public CompletableFuture <InternalResponse > executeAsync (InternalRequest request , HostHandle hostHandle ) {
49+ if (outgoingExecutor .isShutdown ()) {
50+ CompletableFuture <InternalResponse > cf = new CompletableFuture <>();
51+ cf .completeExceptionally (new ArangoDBException ("VstProtocol already closed!" ));
52+ return cf ;
53+ }
4854 return CompletableFuture .completedFuture (null )
4955 .thenComposeAsync (__ -> communication .execute (request , hostHandle ), outgoingExecutor );
5056 }
You can’t perform that action at this time.
0 commit comments