Skip to content

Commit

Permalink
make closing of session explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Jun 5, 2023
1 parent 7edbd31 commit 096fb15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (c *Client) Connect(ctx context.Context) error {
}

if err := c.ActivateSessionWithContext(ctx, s); err != nil {
c.setSession(s)
c.closeSession(ctx, s) // ignore error since we cannot handle it anyway
c.CloseWithContext(ctx)
stats.RecordError(err)

Expand Down

0 comments on commit 096fb15

Please sign in to comment.