@@ -20,7 +20,7 @@ final class PostgresChannelHandler: ChannelDuplexHandler {
2020 private var decoder : NIOSingleStepByteToMessageProcessor < PostgresBackendMessageDecoder >
2121 private var encoder : PostgresFrontendMessageEncoder !
2222 private let configuration : PostgresConnection . InternalConfiguration
23- private let configureSSLCallback : ( ( Channel ) throws -> Void ) ?
23+ private let configureSSLCallback : ( ( Channel , PostgresChannelHandler ) throws -> Void ) ?
2424
2525 private var listenState = ListenStateMachine ( )
2626 private var preparedStatementState = PreparedStatementStateMachine ( )
@@ -29,7 +29,7 @@ final class PostgresChannelHandler: ChannelDuplexHandler {
2929 configuration: PostgresConnection . InternalConfiguration ,
3030 eventLoop: EventLoop ,
3131 logger: Logger ,
32- configureSSLCallback: ( ( Channel ) throws -> Void ) ?
32+ configureSSLCallback: ( ( Channel , PostgresChannelHandler ) throws -> Void ) ?
3333 ) {
3434 self . state = ConnectionStateMachine ( requireBackendKeyData: configuration. options. requireBackendKeyData)
3535 self . eventLoop = eventLoop
@@ -46,7 +46,7 @@ final class PostgresChannelHandler: ChannelDuplexHandler {
4646 eventLoop: EventLoop ,
4747 state: ConnectionStateMachine = . init( . initialized) ,
4848 logger: Logger = . psqlNoOpLogger,
49- configureSSLCallback: ( ( Channel ) throws -> Void ) ?
49+ configureSSLCallback: ( ( Channel , PostgresChannelHandler ) throws -> Void ) ?
5050 ) {
5151 self . state = state
5252 self . eventLoop = eventLoop
@@ -439,7 +439,7 @@ final class PostgresChannelHandler: ChannelDuplexHandler {
439439 // This method must only be called, if we signalized the StateMachine before that we are
440440 // able to setup a SSL connection.
441441 do {
442- try self . configureSSLCallback!( context. channel)
442+ try self . configureSSLCallback!( context. channel, self )
443443 let action = self . state. sslHandlerAdded ( )
444444 self . run ( action, with: context)
445445 } catch {
0 commit comments