File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed
Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ type Client struct {
6262 connsCounter atomic.Int64
6363 create connConstructor // immutable
6464 resolver dcs.Resolver // immutable
65- onDead func () // immutable
65+ onDead func (error ) // immutable
6666 newConnBackoff func () backoff.BackOff // immutable
6767 defaultMode manager.ConnMode // immutable
6868
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ func (c *Client) createConn(
7575 id int64 ,
7676 mode manager.ConnMode ,
7777 setup manager.SetupCallback ,
78- onDead func (),
78+ onDead func (error ),
7979) pool.Conn {
8080 opts , s := c .session .Options (c .opts )
8181 opts .Logger = c .log .Named ("conn" ).With (
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ type Conn struct {
5454 setup SetupCallback // nilable
5555
5656 // onDead is called on connection death.
57- onDead func ()
57+ onDead func (error )
5858
5959 // Wrappers for external world, like logs or PRNG.
6060 // Should be immutable.
@@ -127,7 +127,7 @@ func (c *Conn) Run(ctx context.Context) (err error) {
127127 if err != nil && ctx .Err () == nil {
128128 c .log .Debug ("Connection dead" , zap .Error (err ))
129129 if c .onDead != nil {
130- c .onDead ()
130+ c .onDead (err )
131131 }
132132 }
133133 }()
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ type ConnOptions struct {
2222 Device DeviceConfig
2323 Handler Handler
2424 Setup SetupCallback
25- OnDead func ()
25+ OnDead func (error )
2626 Backoff func (ctx context.Context ) backoff.BackOff
2727}
2828
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ type Options struct {
4949 // ReconnectionBackoff configures and returns reconnection backoff object.
5050 ReconnectionBackoff func () backoff.BackOff
5151 // OnDead will be called on connection dead.
52- OnDead func ()
52+ OnDead func (error )
5353 // MigrationTimeout configures migration timeout.
5454 MigrationTimeout time.Duration
5555
You can’t perform that action at this time.
0 commit comments