Skip to content

fix: remove redundant connection close in SSLError catch block (Closes #625)#654

Merged
luisremis merged 3 commits into
developfrom
fix/issue-625
Apr 22, 2026
Merged

fix: remove redundant connection close in SSLError catch block (Closes #625)#654
luisremis merged 3 commits into
developfrom
fix/issue-625

Conversation

@ad-claw000
Copy link
Copy Markdown
Contributor

Closes #625. Removed the redundant connection close and assignment inside the ssl.SSLError catch block since the re-raised exception is natively caught and closed correctly by the BaseException block immediately underneath.

luisremis
luisremis previously approved these changes Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes redundant connection teardown in the SSL socket-wrapping error path, relying on the existing outer BaseException handler to close the connection consistently (per issue #625).

Changes:

  • Removed self.conn.close() and self.connected = False from the except ssl.SSLError block inside _connect.
  • Keeps connection cleanup centralized in the outer except BaseException handler.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread aperturedb/Connector.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@luisremis luisremis merged commit c3cb4ce into develop Apr 22, 2026
2 checks passed
@luisremis luisremis deleted the fix/issue-625 branch April 22, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I don't think it's necessary to close the connection here, given the BaseException catch below.

3 participants