Skip to content

Commit

Permalink
Do not close connection on error
Browse files Browse the repository at this point in the history
This default is somewhat better suited for the implementation of interactive shells.
  • Loading branch information
gartens committed Mar 27, 2024
1 parent 7c6ebf4 commit 6773b1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public List<ImplementationContext> anyPrepareQuery( QueryContext context, Statem
implementationContexts.add( new ImplementationContext( implementation, parsed, statement, null ) );

} catch ( Throwable e ) {
log.warn( "Caught exception: ", e );
log.warn( "Caught exception: ", e ); // TODO: This should not log in all cases, at least not with stacktrace
if ( transaction.isAnalyze() ) {
transaction.getQueryAnalyzer().attachStacktrace( e );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private void handleMessages() throws IOException, ExecutionException, Interrupte
handle.join();
handle = null;
Response r = response.get();
if ( r.getTypeCase() == Response.TypeCase.DISCONNECT_RESPONSE || r.getTypeCase() == Response.TypeCase.ERROR_RESPONSE ) {
if ( r.getTypeCase() == Response.TypeCase.DISCONNECT_RESPONSE ) {
throw new EOFException();
}
response = null;
Expand Down

0 comments on commit 6773b1e

Please sign in to comment.