You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the result of this (which happens in resolveSettings) is not awaited before creating connections, a race condition exists: connections that are lazily created before the hostname resolution is complete, will connect to the wrong hostname.
The text was updated successfully, but these errors were encountered:
Describe the bug
In MongoCluster, resolving of SRV hostnames is kicked off in
.init(lazyConnectingTo:logger:eventLoopGroup:)
. This happens in asynchronously in a task:MongoKitten/Sources/MongoClient/Cluster.swift
Lines 167 to 172 in 0ca7b30
Because the result of this (which happens in
resolveSettings
) is not awaited before creating connections, a race condition exists: connections that are lazily created before the hostname resolution is complete, will connect to the wrong hostname.The text was updated successfully, but these errors were encountered: