Skip to content

Commit

Permalink
Clarify the timeout errors in MongoKitten
Browse files Browse the repository at this point in the history
  • Loading branch information
Joannis committed Jan 9, 2023
1 parent 587525c commit 4e8e84d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/MongoClient/Cluster.swift
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public final class MongoCluster: MongoConnectionPool, @unchecked Sendable {
// TODO: we can potentially populate a host value from the updated undiscovered host list and continue execution below the guard statement instead of throwing an error

// we throw an error since we could not find a host to connect to
self.logger.error("Couldn't find or create a connection to MongoDB with the requested specification")
self.logger.error("Couldn't find or create a connection to MongoDB with the requested specification. \(timeoutHosts.count) out of \(hosts.count) hosts were in timeout because no TCP connection could be established.")
throw emptyPoolError ?? MongoError(.cannotConnect, reason: .noAvailableHosts)
}

Expand Down

0 comments on commit 4e8e84d

Please sign in to comment.