Skip to content

Commit 2af62a3

Browse files
committed
fix close
1 parent e4a588b commit 2af62a3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/asynchronous/encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ async def kms_request(self, kms_context: MongoCryptKmsContext) -> None:
212212
address, exc, msg_prefix=msg_prefix, timeout_details=_get_timeout_details(opts)
213213
)
214214
finally:
215-
interface.get_conn.close()
215+
conn.close_conn()
216216
except MongoCryptError:
217217
raise # Propagate MongoCryptError errors directly.
218218
except Exception as exc:

pymongo/synchronous/encryption.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def kms_request(self, kms_context: MongoCryptKmsContext) -> None:
211211
address, exc, msg_prefix=msg_prefix, timeout_details=_get_timeout_details(opts)
212212
)
213213
finally:
214-
interface.get_conn.close()
214+
conn.close_conn()
215215
except MongoCryptError:
216216
raise # Propagate MongoCryptError errors directly.
217217
except Exception as exc:

0 commit comments

Comments
 (0)