File tree Expand file tree Collapse file tree
src/main/java/io/weaviate/client6/v1/api/collections/batch Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ private void shutdown() {
294294 }
295295
296296 private void shutdownNow (Exception ex ) {
297- // Now report this error to the server and close the stream.
297+ // Now report this error to the server and terminate the stream.
298298 closing .completeExceptionally (ex );
299299 messages .onError (Status .INTERNAL .withCause (ex ).asRuntimeException ());
300300
@@ -307,10 +307,12 @@ private void shutdownNow(Exception ex) {
307307 } catch (Exception e ) {
308308 }
309309
310- // Since shutdownNow is never triggered by the "main" thread,
311- // it may be blocked on trying to add to the queue. While batch
312- // context is active, we own this thread and may interrupt it.
313- parent .interrupt ();
310+ if (!closed ) {
311+ // Since shutdownNow is never triggered by the "main" thread,
312+ // it may be blocked on trying to add to the queue. While batch
313+ // context is active, we own this thread and may interrupt it.
314+ parent .interrupt ();
315+ }
314316 }
315317
316318 private void shutdownExecutors () {
You can’t perform that action at this time.
0 commit comments