File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
jdbc/src/main/java/tech/ydb/jdbc/context Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -148,17 +148,15 @@ private void closeResultSet(int index) throws SQLException {
148148 }
149149 }
150150
151- private boolean isStreamStopped () {
151+ private void checkStream () {
152152 if (!resultClosed ) {
153- return false ;
153+ return ;
154154 }
155155
156156 if (!streamFuture .isDone () && streamCancelled .compareAndSet (false , true )) {
157157 LOGGER .log (Level .FINE , "Stream cancel" );
158158 stopRunnable .run ();
159159 }
160-
161- return true ;
162160 }
163161
164162 @ Override
@@ -311,10 +309,7 @@ public void cleanQueue() {
311309 public void addResultSet (ResultSetReader rsr ) {
312310 try {
313311 do {
314- if (isStreamStopped ()) {
315- close ();
316- return ;
317- }
312+ checkStream ();
318313 } while (!readers .offer (rsr , 100 , TimeUnit .MILLISECONDS ));
319314 } catch (InterruptedException ex ) {
320315 if (streamFuture .completeExceptionally (ex )) {
You can’t perform that action at this time.
0 commit comments