Skip to content

Commit 9ea4bb8

Browse files
ai: apply changes for #876 (1 review thread)
Addresses: - #3636022364 at src/databricks/sql/auth/oauth.py:162 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent 8aa4e7d commit 9ea4bb8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/databricks/sql/auth/oauth.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ def __get_authorization_code(self, client, auth_url, scope, state, challenge):
160160
# Bound how long we wait for the browser redirect callback so
161161
# that a headless environment (no browser to complete the
162162
# flow) fails with a clear error instead of hanging forever.
163+
# NOTE: httpd.timeout bounds only the wait to ACCEPT an
164+
# incoming connection (it is the select() timeout used by
165+
# handle_request). It does not bound the subsequent read of
166+
# the HTTP request by the handler, so a client that connects
167+
# but never completes the request line could still block. On
168+
# this short-lived loopback server that residual gap is
169+
# acceptable; the headless "no connection ever arrives" case
170+
# (issue #458) is fully covered.
163171
httpd.timeout = self._redirect_callback_timeout_seconds
164172

165173
# HTTPServer.handle_request() returns normally (via

0 commit comments

Comments
 (0)