Skip to content

Commit

Permalink
Shut down the driver's connection pool safely (#224)
Browse files Browse the repository at this point in the history
* Update required versions of dependencies

* Shut down the EventLoopGroupConnectionPool using an API that doesn't call EventLoopFuture.wait() internally.
  • Loading branch information
gwynne authored May 24, 2024
1 parent 26f142d commit 4f07d7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ let package = Package(
.library(name: "FluentMySQLDriver", targets: ["FluentMySQLDriver"]),
],
dependencies: [
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.1"),
.package(url: "https://github.com/vapor/mysql-kit.git", from: "4.7.1"),
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.4"),
.package(url: "https://github.com/vapor/mysql-kit.git", from: "4.8.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
],
targets: [
Expand Down Expand Up @@ -42,6 +42,4 @@ let package = Package(
var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("DisableOutwardActorInference"),
.enableExperimentalFeature("StrictConcurrency=complete"),
] }
4 changes: 2 additions & 2 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ let package = Package(
.library(name: "FluentMySQLDriver", targets: ["FluentMySQLDriver"]),
],
dependencies: [
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.1"),
.package(url: "https://github.com/vapor/mysql-kit.git", from: "4.7.1"),
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.48.4"),
.package(url: "https://github.com/vapor/mysql-kit.git", from: "4.8.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/FluentMySQLDriver/FluentMySQLDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ struct _FluentMySQLDriver: DatabaseDriver {

// See `DatabaseDriver.shutdown()`.
func shutdown() {
self.pool.shutdown()
try? self.pool.syncShutdownGracefully()
}
}

0 comments on commit 4f07d7f

Please sign in to comment.