Skip to content

Commit

Permalink
fix: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
gulivero1773 committed Jun 5, 2024
1 parent 36d9b5c commit 2d4856c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/HealthChecks/MongoHealthChecks/MongoRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public final class MongoRequest: MongoRequestSendable {
await app.mongoCluster?.disconnect()
app.mongoCluster = try? MongoCluster(lazyConnectingTo: ConnectionSettings(url))
let connection = "\(app.mongoCluster?.connectionState ?? .disconnected)"
await app.mongoCluster?.disconnect()
Task {
await app.mongoCluster?.disconnect()
}
return connection
}
}

0 comments on commit 2d4856c

Please sign in to comment.