Skip to content

Commit

Permalink
Support Dremio ODBC's unusual way of hanging forever if it sees data
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Aug 15, 2024
1 parent 2888d5a commit 70368a8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,9 @@ public StreamObserver<Flight.HandshakeRequest> handshake(
// handle the scenario where authentication headers initialized a session
SessionState session = sessionService.getOptionalSession();
if (session != null) {
// We should immediately reply, since some clients will not even send a message on the stream. Do not close
// to avoid hitting https://github.com/envoyproxy/envoy/issues/30149.
GrpcUtil.safelyOnNext(responseObserver, Flight.HandshakeResponse.newBuilder()
.setPayload(session.getExpiration().getTokenAsByteString())
.build());
// Do not reply over the stream, some clients will break if they receive a message here - but since the
// session was already created, our "200 OK" will include the Bearer response already. Do not close
// yet to avoid hitting https://github.com/envoyproxy/envoy/issues/30149.
return new StreamObserver<>() {
@Override
public void onNext(Flight.HandshakeRequest value) {
Expand Down

0 comments on commit 70368a8

Please sign in to comment.