Skip to content

Commit

Permalink
Allow TLS enabled connections when providing an established channel
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrajacic committed Dec 8, 2024
1 parent f2a6394 commit 56adcc6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ extension PostgresConnection {
/// - channel: The `NIOCore/Channel` to use. The channel must already be active and connected to an
/// endpoint (i.e. `NIOCore/Channel/isActive` must be `true`).
/// - tls: The TLS mode to use. Defaults to ``TLS-swift.struct/disable``.
public init(establishedChannel channel: Channel, username: String, password: String?, database: String?) {
self.init(endpointInfo: .configureChannel(channel), tls: .disable, username: username, password: password, database: database)
public init(establishedChannel channel: Channel, tls: PostgresConnection.Configuration.TLS = .disable, username: String, password: String?, database: String?) {
self.init(endpointInfo: .configureChannel(channel), tls: tls, username: username, password: password, database: database)
}

// MARK: - Implementation details
Expand Down

0 comments on commit 56adcc6

Please sign in to comment.