File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
google-cloud-bigquery/src/main/java/com/google/cloud/bigquery Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1069,7 +1069,15 @@ private void processArrowStreamAsync(
10691069 }
10701070
10711071 } catch (Exception e ) {
1072- throw BigQueryException .translateAndThrow (e );
1072+ if (e instanceof InterruptedException || e .getCause () instanceof InterruptedException ) {
1073+ // Log silently and let it fall through to 'finally' for cleanup.
1074+ // This is the "graceful shutdown".
1075+ logger .log (
1076+ Level .INFO , "Background thread interrupted (Connection Closed). Stopping." );
1077+ Thread .currentThread ().interrupt ();
1078+ } else {
1079+ throw BigQueryException .translateAndThrow (e );
1080+ }
10731081 } finally { // logic needed for graceful shutdown
10741082 // marking end of stream
10751083 try {
You can’t perform that action at this time.
0 commit comments