Skip to content

Commit 6b3e254

Browse files
blink1073NoahStapp
andauthored
PYTHON-5297 [v4.12] AsyncMongoClient connection error causes UnboundLocalError (#2277)
Co-authored-by: Noah Stapp <[email protected]>
1 parent de0e233 commit 6b3e254

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

doc/changelog.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ Changes in Version 4.12.1 (XXXX/XX/XX)
66

77
Version 4.12.1 is a bug fix release.
88

9+
- Fixed a bug that could raise ``UnboundLocalError`` when creating asynchronous connections over SSL.
910
- Fixed a bug causing SRV hostname validation to fail when resolver and resolved hostnames are identical with three domain levels.
1011

1112
Issues Resolved
1213
...............
1314

14-
See the `PyMongo 4.12 release notes in JIRA`_ for the list of resolved issues
15+
See the `PyMongo 4.12.1 release notes in JIRA`_ for the list of resolved issues
1516
in this release.
1617

17-
.. _PyMongo 4.12 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=41916
18-
.. _PYTHON-5288: https://jira.mongodb.org/browse/PYTHON-5288
18+
.. _PyMongo 4.12.1 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=43094
1919

2020
Changes in Version 4.12.0 (2025/04/08)
2121
--------------------------------------

pymongo/pool_shared.py

-2
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,10 @@ async def _configured_protocol_interface(
346346
ssl=ssl_context,
347347
)
348348
except _CertificateError:
349-
transport.abort()
350349
# Raise _CertificateError directly like we do after match_hostname
351350
# below.
352351
raise
353352
except (OSError, SSLError) as exc:
354-
transport.abort()
355353
# We raise AutoReconnect for transient and permanent SSL handshake
356354
# failures alike. Permanent handshake failures, like protocol
357355
# mismatch, will be turned into ServerSelectionTimeoutErrors later.

0 commit comments

Comments
 (0)