Skip to content

Commit 03ccebe

Browse files
committed
Use newly defined srv_host
1 parent 0f1f8a7 commit 03ccebe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/asynchronous/srv_resolver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ async def _get_srv_response_and_hosts(
144144
"Invalid SRV host: return address is identical to SRV hostname"
145145
)
146146
try:
147-
nlist = node[0].lower().split(".")[1:][-self.__slen :]
147+
nlist = srv_host.split(".")[1:][-self.__slen :]
148148
except Exception:
149149
raise ConfigurationError(f"Invalid SRV host: {node[0]}") from None
150150
if self.__plist != nlist:

pymongo/synchronous/srv_resolver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _get_srv_response_and_hosts(
144144
"Invalid SRV host: return address is identical to SRV hostname"
145145
)
146146
try:
147-
nlist = node[0].lower().split(".")[1:][-self.__slen :]
147+
nlist = srv_host.split(".")[1:][-self.__slen :]
148148
except Exception:
149149
raise ConfigurationError(f"Invalid SRV host: {node[0]}") from None
150150
if self.__plist != nlist:

0 commit comments

Comments
 (0)