diff --git a/client.go b/client.go index e2ef7c86..79dde71a 100644 --- a/client.go +++ b/client.go @@ -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)